Migration squash for all migrations in 14.10
What does this MR do and why?
Squashes all migrations present in 14.10.
This MR represents an deviation from how we did migration squashes previously.
The previous process we developed was:
- Pick a stopping point, typically a "hard stop"
- Count the number of migrations from the beginning of time to the HEAD of the hard stop
- Divide the array of migrations into "chunks", for example 300. The conventional thinking was that chunks of migrations are more manageable per MR than one huge MR. Then for each chunk:
- Run
db:migrate
up to the end of a chunk, chronologically - After running
db:migrate
, the current structure.sql becomes the new init_structure.sql - Delete the migration files run, plus downstream dependencies and specs.
- Cleanup the db/schema_migrations directory
This process:
- List all migration and post migration files in the hard stop before the release we want to "squash to", in this example we look at 14.10, ignoring the init_schema migration.
- Grab the
structure.sql
from the target branch. - The
structure.sql
from the target branch becomesinit_structure.sql
in master. - Delete all files listed in step 1, as well as their specs.
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: #370640 (closed)
Edited by Jon Jenkins