1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-10 21:24:20 +01:00
fab-manager/db/migrate/20190107103632_create_accounting_periods.rb
2019-01-07 12:29:52 +01:00

16 lines
350 B
Ruby

class CreateAccountingPeriods < ActiveRecord::Migration
def change
create_table :accounting_periods do |t|
t.date :start_at
t.date :end_at
t.datetime :closed_at
t.integer :closed_by
t.timestamps null: false
end
add_foreign_key :accounting_periods, :users, column: :closed_by, primary_key: :id
end
end