Skip to content

Start using milestones

Jon Jenkins requested to merge 414014-start-using-milestones into master

What does this MR do and why?

Adds support code to start requiring milestones as well as including the current milestone when generating a new migration. In order to help customers upgrade in a more consistent way, and to make sure we’re always leaving customers in a state compatible with a version of the product, we’re adding milestones to migrations. Going forward, in milestone 16.6 and later, all new migrations will require a milestone to be specified. The appropriate syntax will be added to the generation script. We also anticipate that in 16.6 we will start ordering migrations in milestone order first and then timestamp order, however the milestone requirement will be merged shortly.

How to set up and validate locally

  1. Create a new migration and see that the milestone syntax is added, reflecting the version specified in the VERSION file: bundle exec rails generate migration Foo
  2. Remove the milestone syntax and test:
    • That rubocop linting fails for the file
    • An error is raised when trying to run db:migrate

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 #414014 (closed)

Edited by Jon Jenkins

Merge request reports