1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-05 13:35:21 +02:00

Rework Account to use delegated types

This commit is contained in:
Rob Zolkos 2024-02-02 23:09:35 +00:00
parent 938656de0e
commit 71939d6fb5
36 changed files with 282 additions and 0 deletions

View file

@ -0,0 +1,7 @@
class CreateAccountLoans < ActiveRecord::Migration[7.2]
def change
create_table :account_loans, id: :uuid do |t|
t.timestamps
end
end
end

View file

@ -0,0 +1,6 @@
class AddAccountableToAccount < ActiveRecord::Migration[7.2]
def change
add_column :accounts, :accountable_type, :string
add_column :accounts, :accountable_id, :uuid
end
end

View file

@ -0,0 +1,7 @@
class CreateAccountDepositories < ActiveRecord::Migration[7.2]
def change
create_table :account_depositories, id: :uuid do |t|
t.timestamps
end
end
end

View file

@ -0,0 +1,7 @@
class CreateAccountCredits < ActiveRecord::Migration[7.2]
def change
create_table :account_credits, id: :uuid do |t|
t.timestamps
end
end
end

View file

@ -0,0 +1,7 @@
class CreateAccountInvestments < ActiveRecord::Migration[7.2]
def change
create_table :account_investments, id: :uuid do |t|
t.timestamps
end
end
end

View file

@ -0,0 +1,7 @@
class CreateAccountProperties < ActiveRecord::Migration[7.2]
def change
create_table :account_properties, id: :uuid do |t|
t.timestamps
end
end
end

View file

@ -0,0 +1,7 @@
class CreateAccountVehicles < ActiveRecord::Migration[7.2]
def change
create_table :account_vehicles, id: :uuid do |t|
t.timestamps
end
end
end

View file

@ -0,0 +1,7 @@
class CreateAccountOtherAssets < ActiveRecord::Migration[7.2]
def change
create_table :account_other_assets, id: :uuid do |t|
t.timestamps
end
end
end

View file

@ -0,0 +1,7 @@
class CreateAccountOtherLiabilities < ActiveRecord::Migration[7.2]
def change
create_table :account_other_liabilities, id: :uuid do |t|
t.timestamps
end
end
end