nodestream-proj / nodestream

A Declarative framework for Building, Maintaining, and Analyzing Graph Data
https://nodestream-proj.github.io/docs/
Apache License 2.0
36 stars 10 forks source link

[REQUEST] Squash Migrations #299

Closed zprobst closed 2 weeks ago

zprobst commented 3 months ago

Is your feature request related to a problem? Please describe. Django supports the concept of Squashing Migrations. In general the use case is that, as you are developing pipelines, you may alter the schema as you are developing and thus, generate several migrations. Instead of checking them all in (which would be fine) its preferred to have one migration that represents the aggregate set of changes that you made.

Describe the solution you'd like Imagine something like this:

nodestream migrations squash --from migration-name-1 --to migration-name 2 
nodestream migrations squash --from migration-name-1  # leaving off to picks the head migration 

Conceptually, I think this means we need to do the following:

Describe alternatives you've considered You can just delete all the migrations that you don't want any more and regenerate the migrations. However, that introduces manual effort to understand the migration graph and feels a little hacky.

Additional context N/A

zprobst commented 2 weeks ago

This has been implemented in 0.13 via #346. Pending release.