mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-29 10:24:20 +01:00
25 lines
734 B
Ruby
25 lines
734 B
Ruby
|
# 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
|