mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
02380af75c
This avoids locking the index's table
19 lines
398 B
Ruby
19 lines
398 B
Ruby
# frozen_string_literal: true
|
|
class DropTrgmIndexesOnUsers < ActiveRecord::Migration[7.1]
|
|
disable_ddl_transaction!
|
|
|
|
def up
|
|
execute <<~SQL
|
|
DROP INDEX CONCURRENTLY IF EXISTS index_users_on_username_lower_trgm;
|
|
SQL
|
|
|
|
execute <<~SQL
|
|
DROP INDEX CONCURRENTLY IF EXISTS index_users_on_name_trgm;
|
|
SQL
|
|
end
|
|
|
|
def down
|
|
raise ActiveRecord::IrreversibleMigration
|
|
end
|
|
end
|