scinote-web/db/migrate/20210618104853_add_code_index_to_experiments.rb

6 lines
189 B
Ruby
Raw Normal View History

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