You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The current implementation of ash_postgres.gen.resources assumes that one porting an existing application to Ash. This is likely not the most common case, as it is rare that someone would abandon an existing app and a new one in a different language.
Instead, it is likely that migration from another environment is gradual and the management of the low level schema would remain in the original app for a while initially.
This means that the PG schema is really externally managed and likely to change -- which means I would have to manually edit my previously generated resources. This is error prone!
Describe the solution you'd like
Add an --use_fragments option to the generator.
This would generate the attributes and relationships in a separate fragment file.
If the resource does not exist (the first you run the generator), then the resource is created with a link to the fragment.
With this, person_model.ex can be regenerated at will. It would not alter or edit person.ex and all actions, calculations, changes etc... would be maintained.
Additional context
This argument is really about easing Elixir/Ash adoption.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The current implementation of
ash_postgres.gen.resources
assumes that one porting an existing application to Ash. This is likely not the most common case, as it is rare that someone would abandon an existing app and a new one in a different language.Instead, it is likely that migration from another environment is gradual and the management of the low level schema would remain in the original app for a while initially.
This means that the PG schema is really externally managed and likely to change -- which means I would have to manually edit my previously generated resources. This is error prone!
Describe the solution you'd like
Add an
--use_fragments
option to the generator.This would generate the attributes and relationships in a separate fragment file.
If the resource does not exist (the first you run the generator), then the resource is created with a link to the fragment.
With this,
person_model.ex
can be regenerated at will. It would not alter or editperson.ex
and allactions
,calculations
,changes
etc... would be maintained.Additional context
This argument is really about easing Elixir/Ash adoption.
The text was updated successfully, but these errors were encountered: