mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-05 07:03:51 +08:00
15 lines
404 B
Ruby
15 lines
404 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AddCodeIndexToExperiments < ActiveRecord::Migration[6.1]
|
|
def up
|
|
ActiveRecord::Base.connection.execute(
|
|
"CREATE INDEX index_experiments_on_experiment_code ON experiments using gin (('EX'::text || id) gin_trgm_ops);"
|
|
)
|
|
end
|
|
|
|
def down
|
|
ActiveRecord::Base.connection.execute(
|
|
'DROP INDEX index_experiments_on_experiment_code;'
|
|
)
|
|
end
|
|
end
|