From abcc0b38fab3c3e5987943741588aa64054fdc22 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 19 Sep 2023 17:31:58 +0200 Subject: [PATCH] Fix incorrect PostgreSQL version check (#26979) --- ...20230803082451_add_unique_index_on_preview_cards_statuses.rb | 2 +- lib/mastodon/migration_helpers.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db/post_migrate/20230803082451_add_unique_index_on_preview_cards_statuses.rb b/db/post_migrate/20230803082451_add_unique_index_on_preview_cards_statuses.rb index 3e9ab134b..d29d7847c 100644 --- a/db/post_migrate/20230803082451_add_unique_index_on_preview_cards_statuses.rb +++ b/db/post_migrate/20230803082451_add_unique_index_on_preview_cards_statuses.rb @@ -18,7 +18,7 @@ class AddUniqueIndexOnPreviewCardsStatuses < ActiveRecord::Migration[6.1] def supports_concurrent_reindex? @supports_concurrent_reindex ||= begin version = select_one("SELECT current_setting('server_version_num') AS v")['v'].to_i - version >= 12_000 + version >= 120_000 end end diff --git a/lib/mastodon/migration_helpers.rb b/lib/mastodon/migration_helpers.rb index 4a43f67c2..c382b5fbd 100644 --- a/lib/mastodon/migration_helpers.rb +++ b/lib/mastodon/migration_helpers.rb @@ -202,7 +202,7 @@ module Mastodon def supports_add_column_with_default? version = select_one("SELECT current_setting('server_version_num') AS v")['v'].to_i - version >= 11_000 + version >= 110_000 end # Adds a foreign key with only minimal locking on the tables involved.