Skip to content

Migration squash for all migrations in 14.10

Jon Jenkins requested to merge experimental-squash into master

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:

  1. Pick a stopping point, typically a "hard stop"
  2. Count the number of migrations from the beginning of time to the HEAD of the hard stop
  3. 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:
  4. Run db:migrate up to the end of a chunk, chronologically
  5. After running db:migrate, the current structure.sql becomes the new init_structure.sql
  6. Delete the migration files run, plus downstream dependencies and specs.
  7. Cleanup the db/schema_migrations directory

This process:

  1. 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.
  2. Grab the structure.sql from the target branch.
  3. The structure.sql from the target branch becomes init_structure.sql in master.
  4. 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.

Related to: #370640 (closed)

Edited by Jon Jenkins

Merge request reports

Loading