1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/db/migrate/20221118092948_create_accounting_lines.rb

25 lines
734 B
Ruby
Raw Normal View History

# frozen_string_literal: true
# From this migration we save the accounting lines in database rather than building them on-the-fly.
# This will improve performance for API based requests
class CreateAccountingLines < ActiveRecord::Migration[5.2]
def change
create_table :accounting_lines do |t|
t.string :line_type
t.string :journal_code
t.datetime :date
t.string :account_code
t.string :account_label
t.string :analytical_code
t.references :invoice, foreign_key: true, index: true
t.references :invoicing_profile, foreign_key: true, index: true
t.integer :debit
t.integer :credit
t.string :currency
t.string :summary
t.timestamps
end
end
end