mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 10:20:58 -06:00
5968dc07a5
This commit promotes all post_deploy migrations which existed in Discourse v2.6.7 (timestamp <= 20201110110952)
19 lines
436 B
Ruby
19 lines
436 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AddIndexTopicsOnTimestampsPrivate < ActiveRecord::Migration[6.0]
|
|
disable_ddl_transaction!
|
|
|
|
def up
|
|
execute <<~SQL
|
|
CREATE INDEX CONCURRENTLY IF NOT EXISTS
|
|
index_topics_on_timestamps_private
|
|
ON topics (bumped_at, created_at, updated_at)
|
|
WHERE deleted_at IS NULL AND archetype = 'private_message'
|
|
SQL
|
|
end
|
|
|
|
def down
|
|
raise ActiveRecord::IrreversibleMigration
|
|
end
|
|
end
|