0
0
Fork 0

Fix Rails/RakeEnvironment cop (#28782)

This commit is contained in:
Matt Jankowski 2024-01-17 11:33:17 -05:00 committed by GitHub
parent 30b193b856
commit 127503eb2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 13 deletions

View file

@ -15,7 +15,7 @@ namespace :db do
end
end
task :pre_migration_check do
task pre_migration_check: :environment do
version = ActiveRecord::Base.connection.select_one("SELECT current_setting('server_version_num') AS v")['v'].to_i
abort 'This version of Mastodon requires PostgreSQL 9.5 or newer. Please update PostgreSQL before updating Mastodon' if version < 90_500
end