demarches-normaliennes/db/migrate/20221006074425_add_tags_to_procedures.rb

10 lines
346 B
Ruby

class AddTagsToProcedures < ActiveRecord::Migration[6.1]
disable_ddl_transaction!
def change
# we have a small number of procedure so it must go smoothly
safety_assured do
add_column :procedures, :tags, :text, array: true, default: []
add_index :procedures, :tags, using: 'gin', algorithm: :concurrently
end
end
end