mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-10 21:24:20 +01:00
16 lines
350 B
Ruby
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
|