Fix Rails/RakeEnvironment cop (#28782)

This commit is contained in:
Matt Jankowski authored and GitHub committed 2024-01-17 16:33:17 +00:00
1 parent 30b193b856
commit 127503eb2c
3 files changed
+11 -13

No files matched your search

+1 -1
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