demarches-normaliennes/db/migrate/20210427124500_add_key_to_archives.rb

9 lines
230 B
Ruby
Raw Normal View History

# frozen_string_literal: true
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