Start using milestones
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
- 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
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #414014 (closed)