Skip to content

Commit

Permalink
Fix incorrect PostgreSQL version check (#26979)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire committed Sep 19, 2023
1 parent f4b780b commit abcc0b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def down
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

Expand Down
2 changes: 1 addition & 1 deletion lib/mastodon/migration_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def supports_drop_index_concurrently?
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.
Expand Down

0 comments on commit abcc0b3

Please sign in to comment.