scinote-web/db/migrate/20200603125407_add_archive_to_repository.rb

12 lines
337 B
Ruby
Raw Normal View History

2020-06-04 21:44:47 +08:00
# frozen_string_literal: true
class AddArchiveToRepository < ActiveRecord::Migration[6.0]
def change
change_table :repositories, bulk: true do |t|
t.boolean :archived, default: false, null: false
t.datetime :archived_on
t.references :archived_by, index: true, foreign_key: { to_table: :users }
end
end
end