Remove old migrations - Part II
What does this MR do and why?
In this MR, we are squashing migrations before 2020.12.12.
Part I had an impact of 5 minutes on rspec migration
jobs
We still need to have a Part III, where we are going to continue the cleanup :)
I have used the following script to be able to squash the migrations and remove the spec files.
-
bundle exec rake db:drop db:create db:migrate VERSION=20201211042306
-> Drops the database; Creates a new database; Migrates to a specific version -
bundle exec rake db:structure:dump SCHEMA=db/init_structure.sql
-> Creates a new structure file with the nameinit_structure.sql
-
rake remove_old_migrations[20201211042306]
-> Removes all migration files + specs (*) MR -
bundle exec rake db:drop db:create db:migrate
-> Creates a new database without using the old migrations
(*) We are not removing the init schema migration.
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #331248 (closed)
Edited by Diogo Frazão