Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - `.github/ISSUE_TEMPLATE/bug_report.md`: Upstream added the `bug` label to bug reports. Did the same. - `app/services/fan_out_on_write_service.rb`: Upstream put DMs back into timelines, glitch-soc was already doing it. Ignored upstream changes.
This commit is contained in:
commit
48f0f3ffee
42 changed files with 1362 additions and 320 deletions
|
@ -48,6 +48,17 @@ namespace :db do
|
|||
end
|
||||
end
|
||||
|
||||
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'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Rake::Task['db:migrate'].enhance(['db:post_migration_hook'])
|
||||
|
||||
# Before we load the schema, define the timestamp_id function.
|
||||
# Idiomatically, we might do this in a migration, but then it
|
||||
# wouldn't end up in schema.rb, so we'd need to figure out a way to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue