Capture minimum postgres version 12 #27528
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Per @renchap request -- we set the expectation of not supporting EOL'd postgres in the 4.2 release notes - https://github.com/mastodon/mastodon/releases/tag/v4.2.0 - this change updates the README to reflect 12+ and also updates the strong migrations target version.
I also included the removal of a bunch of version-dependent checks in the migration helpers. This is probably fine since we're dropping that support, but it also feels odd to edit what I think is essentially "vendored" code originally taken from the gitlab project. It may make sense outside the scope of this PR to actually do it that way: vendor the files as-is taken from gitlab, and then separate out the additions made to the script. Alternately, if I'm thinking about this wrong and it's very much "our" script at this point even though its origins are another project, none of this matters and we can modify away.
Also open to feedback on any other areas of code/docs which could be bumped to require PG12+ and/or optimized if we no longer need to support older.