Fix test
This commit is contained in:
parent
935bea989d
commit
368ddb1bb6
1 changed files with 2 additions and 2 deletions
|
@ -8,13 +8,13 @@ class ImproveIndexForPublicTimelineSpeed < ActiveRecord::Migration[7.0]
|
||||||
where: '(local OR (uri IS NULL)) AND deleted_at IS NULL AND visibility IN (0, 10, 11) AND reblog_of_id IS NULL AND ((NOT reply) OR (in_reply_to_account_id = account_id))'
|
where: '(local OR (uri IS NULL)) AND deleted_at IS NULL AND visibility IN (0, 10, 11) AND reblog_of_id IS NULL AND ((NOT reply) OR (in_reply_to_account_id = account_id))'
|
||||||
add_index :statuses, [:id, :account_id], name: :index_statuses_public_20231213, algorithm: :concurrently, order: { id: :desc }, where: 'deleted_at IS NULL AND visibility IN (0, 10, 11) AND reblog_of_id IS NULL AND ((NOT reply) OR (in_reply_to_account_id = account_id))' # rubocop:disable Naming/VariableNumber
|
add_index :statuses, [:id, :account_id], name: :index_statuses_public_20231213, algorithm: :concurrently, order: { id: :desc }, where: 'deleted_at IS NULL AND visibility IN (0, 10, 11) AND reblog_of_id IS NULL AND ((NOT reply) OR (in_reply_to_account_id = account_id))' # rubocop:disable Naming/VariableNumber
|
||||||
remove_index :statuses, name: :index_statuses_local_20190824 # rubocop:disable Naming/VariableNumber
|
remove_index :statuses, name: :index_statuses_local_20190824 # rubocop:disable Naming/VariableNumber
|
||||||
remove_index :statuses, name: :index_statuses_public_20200119 # rubocop:disable Naming/VariableNumber
|
remove_index :statuses, if_exists: true, name: :index_statuses_public_20200119 # rubocop:disable Naming/VariableNumber
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
add_index :statuses, [:id, :account_id], name: :index_statuses_local_20190824, algorithm: :concurrently, order: { id: :desc }, where: '(local OR (uri IS NULL)) AND deleted_at IS NULL AND visibility = 0 AND reblog_of_id IS NULL AND ((NOT reply) OR (in_reply_to_account_id = account_id))' # rubocop:disable Naming/VariableNumber
|
add_index :statuses, [:id, :account_id], name: :index_statuses_local_20190824, algorithm: :concurrently, order: { id: :desc }, where: '(local OR (uri IS NULL)) AND deleted_at IS NULL AND visibility = 0 AND reblog_of_id IS NULL AND ((NOT reply) OR (in_reply_to_account_id = account_id))' # rubocop:disable Naming/VariableNumber
|
||||||
add_index :statuses, [:id, :account_id], name: :index_statuses_public_20200119, algorithm: :concurrently, order: { id: :desc }, where: 'deleted_at IS NULL AND visibility = 0 AND reblog_of_id IS NULL AND ((NOT reply) OR (in_reply_to_account_id = account_id))' # rubocop:disable Naming/VariableNumber
|
add_index :statuses, [:id, :account_id], name: :index_statuses_public_20200119, algorithm: :concurrently, order: { id: :desc }, where: 'deleted_at IS NULL AND visibility = 0 AND reblog_of_id IS NULL AND ((NOT reply) OR (in_reply_to_account_id = account_id))' # rubocop:disable Naming/VariableNumber
|
||||||
remove_index :statuses, name: :index_statuses_local_20231213 # rubocop:disable Naming/VariableNumber
|
remove_index :statuses, name: :index_statuses_local_20231213 # rubocop:disable Naming/VariableNumber
|
||||||
remove_index :statuses, name: :index_statuses_public_20231213 # rubocop:disable Naming/VariableNumber
|
remove_index :statuses, if_exists: true, name: :index_statuses_public_20231213 # rubocop:disable Naming/VariableNumber
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue