A way to squash history? #620
Replies: 2 comments
-
Hi @philippefutureboy. There is not a feature for this built-in to Sqitch. The pattern for this sort of thing is generally to dump the database and create a new plan. That FAQ item assumes you're starting from an unmanaged database, but in your case, if you're using the same plan name and URL, you'd want to take the additional step of removing all the changes from the registry before deploying the new single change. If it's the only project in the database, you can simply HTH, and holler if you have any other questions. |
Beta Was this translation helpful? Give feedback.
-
Hey David/@theory! That's a fantastic answer. Thanks for taking the time to describe the procedure to carry out the squash. Have a wonderful day! |
Beta Was this translation helpful? Give feedback.
-
Hi there,
I was wondering if there was a way / a plan to introduce a way to squash previous migrations history. We currently have over 200 migrations and counting. Some of them date from two years ago and do not serve much use for us to keep around any longer.
Is there an easy way to rewrite (squash) a subset of earlier commits in the sqitch plan and deploy the rewritten history to a database that has already the history of the previous changes?
Have a great day!
Cheers,
Philippe
Beta Was this translation helpful? Give feedback.
All reactions