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

What is the Benefit of Squashing into an init Migration Over Just Deleting The Migrations? #76

Open
sshaw opened this issue Jun 23, 2023 · 0 comments

Comments

@sshaw
Copy link

sshaw commented Jun 23, 2023

I read the README. I've talked to colleagues. And it is not clear why one would need to use this gem.

The DB schema is in schema.rb or structure.sql. This is the definitive source. New developers will load this or new copys of the DB will load this.

Existing devs will run the migrations but, after a certain amount of time, all devs will be up-to-date for a given set of migrations. These can be deleted.

With this gem these are deleted but also moved into a new an "init" migration. Now the project has 2 sources and a new version number every time migrations are squashed. This new version number contains entities that have already been applied to the DB and exist in schema.rb or structure.sql.

Why would one ever need to move unused migrations into a new init migration? Please explain. No one else can and I am lost 🧭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant