Change index corruption warning to be a little less scary (#17395)

signup-info-prompt
Claire 2022-01-30 23:49:52 +01:00 committed by GitHub
parent a99adeaad3
commit c6b291afc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -21,8 +21,8 @@ namespace :db do
at_exit do at_exit do
unless %w(C POSIX).include?(ActiveRecord::Base.connection.select_one('SELECT datcollate FROM pg_database WHERE datname = current_database();')['datcollate']) unless %w(C POSIX).include?(ActiveRecord::Base.connection.select_one('SELECT datcollate FROM pg_database WHERE datname = current_database();')['datcollate'])
warn <<~WARNING warn <<~WARNING
Your database collation is susceptible to index corruption. Your database collation may be susceptible to index corruption.
(This warning does not indicate that index corruption has occurred and can be ignored) (This warning does not indicate that index corruption has occurred, and it can be ignored if you've previously checked for index corruption)
(To learn more, visit: https://docs.joinmastodon.org/admin/troubleshooting/index-corruption/) (To learn more, visit: https://docs.joinmastodon.org/admin/troubleshooting/index-corruption/)
WARNING WARNING
end end