scinote-web/db/migrate/20210618104853_add_code_index_to_experiments.rb
2021-06-18 14:12:59 +02:00

5 lines
189 B
Ruby

class AddCodeIndexToExperiments < ActiveRecord::Migration[6.1]
def change
add_index :experiments, "('EX' || id)", name: "index_experiments_on_experiment_code", unique: true
end
end