1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-28 09:24:24 +01:00
fab-manager/db/migrate/20221110120338_create_advanced_accountings.rb
Sylvain 7868f31a58 (feat) advanced accounting parameters
for: machines, spaces, trainings, events
2022-12-21 14:05:15 +01:00

16 lines
466 B
Ruby

# frozen_string_literal: true
# Advanced accouting parameters are stored in a dedicated table,
# with a polymorphic relation per object
class CreateAdvancedAccountings < ActiveRecord::Migration[5.2]
def change
create_table :advanced_accountings do |t|
t.string :code
t.string :analytical_section
t.references :accountable, polymorphic: true, index: { name: 'index_advanced_accountings_on_accountable' }
t.timestamps
end
end
end