Prevent multi-version upgrades when background migrations are skipped
Release notes
Multi-version upgrade jumps will be safely prevented/denied with an error when SKIP_POST_DEPLOYMENT_MIGRATIONS
is true
Problem to solve
It is currently possible for users to render their self-managed instance unusable if they skip background migrations while following the recommended upgrade path.
Instructions in https://docs.gitlab.com/ee/update/zero_downtime.html#single-node-deployment warn that users should not upgrade more than one version at a time.
However, warnings in documentation are often ignored, and when users follow those stated instructions they end up skipping every background migration between the two upgrade path points they found in document https://docs.gitlab.com/ee/update/#upgrade-paths
This causes data losses from drops of columns/tables having executed prior to moves/transformations that were required on them.
Their instance is rendered entirely unusable and rolling back using a healthy backup becomes the only option.
Proposal
If SKIP_POST_DEPLOYMENT_MIGRATIONS
is found in use during the first reconfigure or migration execution, and it is determined that the previous version was over 1 minor release ago, then do not execute any migrations and abort immediately. Error must also state the right approach to upgrade, or point to the documentation.