Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add interface to roll up all changes into a single change #605

Open
kylebamos opened this issue Jan 28, 2022 · 1 comment
Labels

Comments

@kylebamos
Copy link

Given a project that grows and evolves forever, migrations files become prolific in project repos and new/test setups take longer and longer to migrate/fixturize.

Is there a way to roll up all migrations to a certain point and execute them as a minimal number of steps with sqitch? Similar to "flattening" in django or "truncating history" in alembic/sqlalchemy?

Since migrations are just raw SQL here, I'm somewhat anticipating that there's not a great solution to this other than migrating to a specific point, dumping the schema and making that the new initial state and what not all manually, but I figured I'd ask here anyway.

@theory
Copy link
Collaborator

theory commented Feb 3, 2022

There is not a feature to automatically flatten things in Sqitch, but you can more or less do the equivalent by following the instructions to start with an existing database.

Will make this a feature request.

@theory theory added the feature label Feb 3, 2022
@theory theory changed the title Flatten Migrations Feature Request: Add interface to roll up all changes into a single change Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants