Skip to content

Resolve "Remove old migrations in release 14 (PART IV)"

What does this MR do and why?

In this MR, we are squashing Gitlab v13 migrations.

I have used the following script to be able to squash the migrations and remove the spec files.

  1. bundle exec rake db:drop db:create db:migrate VERSION=20210301200959 -> Drops the database; Creates a new database; Migrates to a specific version
  2. bundle exec rake db:structure:dump SCHEMA=db/init_structure.sql -> Creates a new structure file with the name init_structure.sql
  3. rake remove_old_migrations[20210301200959] -> Removes all migration files + specs (*) MR
  4. bundle exec rake db:drop db:create db:migrate -> Creates a new database without using the old migrations

Please double-check that we are not removing migrations of v14.

I have also changed the version of the init schema migration from 20181228175414 to 20210301200959.

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.

Related to #331248 (closed)

Edited by Diogo Frazão

Merge request reports