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

7 lines
220 B
Ruby

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