demarches-normaliennes/db/migrate/20210427124500_add_key_to_archives.rb
2021-04-28 11:40:58 +02:00

6 lines
199 B
Ruby

class AddKeyToArchives < ActiveRecord::Migration[6.1]
def change
add_column :archives, :key, :text, null: false
add_index :archives, [:key, :time_span_type, :month], unique: true
end
end