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
When load_package is run currently, all Django migrations for core Arches, the project, and any installed Arches Applications are run prior to loading graphs. The desire is to be to be able to run migrations, especially migrations in a given Arches Application (say RDM/ADM/Arches Lingo), after graphs are loaded.
The use case in mind is a scenario in which a given migration runs __arches_create_resource_model_views() to initialize the relational views for a given model. The relational views schema will fail to be created if there are no models imported. It'd be nice to be able to indicate that a given migration should be run after graphs have been loaded. We've seen this scenario in the current RDM work as well as work for SF Port Lease Pipeline - Applications app.
The current work around is to revert to a prior migration and then the re-run the migration to create the relational views.
create the graphs in the migration (then importing the graphs as part of package load could still overwrite them, and the views would still work?)
I asked @johnatawnclementawn to raise this proposal, but I'm starting to like 2. a lot more. We probably don't want to encourage the practice of writing migrations that have dependencies on things outside the migration system.
I had a similar requirement. My work around for it was to add the scripts to the pkg/business_data/resource_views folder. I agree it would be more desirable to have them as part of a migration to be consistent.
While not tenable in the long run, the workaround I've been using is to have the first migration of an Arches Application have a dependency on the last migration of Arches core.
When
load_package
is run currently, all Django migrations for core Arches, the project, and any installed Arches Applications are run prior to loading graphs. The desire is to be to be able to run migrations, especially migrations in a given Arches Application (say RDM/ADM/Arches Lingo), after graphs are loaded.The use case in mind is a scenario in which a given migration runs
__arches_create_resource_model_views()
to initialize the relational views for a given model. The relational views schema will fail to be created if there are no models imported. It'd be nice to be able to indicate that a given migration should be run after graphs have been loaded. We've seen this scenario in the current RDM work as well as work for SF Port Lease Pipeline - Applications app.The current work around is to revert to a prior migration and then the re-run the migration to create the relational views.
re. recent conversations with @robgaston and @jacobtylerwalls
The text was updated successfully, but these errors were encountered: