about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2020-11-27 15:41:43 +0100
committerGitHub <noreply@github.com>2020-11-27 15:41:43 +0100
commitec0edf74d672146ea41fabe17f8e2c4e8eaf7459 (patch)
tree8d4a8d213989c10a0e7922b3a98e8ee83748dff6
parent1e89e2ed988d2103ecd46e06476d863cb40c57c7 (diff)
Fix post-migration warning about index corruption being too scary (#15223)
-rw-r--r--lib/tasks/db.rake7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake
index 199155107..f6c9c7eec 100644
--- a/lib/tasks/db.rake
+++ b/lib/tasks/db.rake
@@ -51,8 +51,11 @@ namespace :db do
   task :post_migration_hook do
     at_exit do
       unless %w(C POSIX).include?(ActiveRecord::Base.connection.execute('SELECT datcollate FROM pg_database WHERE datname = current_database();').first['datcollate'])
-        Rails.logger.warn 'WARNING: Your database is using an unsafe collation setting, which might result in index corruption.'
-        Rails.logger.warn 'WARNING: See https://docs.joinmastodon.org/admin/troubleshooting/index-corruption/#am-i-affected'
+        warn <<~WARNING
+          Your database collation is susceptible to index corruption.
+            (This warning does not indicate that index corruption has occured and can be ignored)
+            (To learn more, visit: https://docs.joinmastodon.org/admin/troubleshooting/index-corruption/)
+        WARNING
       end
     end
   end