Add BankAccount to SupplierCategory
This commit is contained in:
parent
06b035f2ea
commit
7e60ce6ce2
|
@ -1,5 +1,6 @@
|
|||
class SupplierCategory < ActiveRecord::Base
|
||||
belongs_to :financial_transaction_class
|
||||
belongs_to :bank_account, optional: true
|
||||
has_many :suppliers
|
||||
|
||||
normalize_attributes :name, :description
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class AddBankAccountToSupplierCategory < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_reference :supplier_categories, :bank_account
|
||||
end
|
||||
end
|
|
@ -475,6 +475,7 @@ ActiveRecord::Schema.define(version: 2021_02_05_090257) do
|
|||
t.string "name", null: false
|
||||
t.string "description"
|
||||
t.integer "financial_transaction_class_id"
|
||||
t.integer "bank_account_id"
|
||||
end
|
||||
|
||||
create_table "suppliers", id: :integer, force: :cascade do |t|
|
||||
|
|
Loading…
Reference in New Issue