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:
parent
938656de0e
commit
71939d6fb5
36 changed files with 282 additions and 0 deletions
7
db/migrate/20240202191425_create_account_loans.rb
Normal file
7
db/migrate/20240202191425_create_account_loans.rb
Normal 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
|
6
db/migrate/20240202191746_add_accountable_to_account.rb
Normal file
6
db/migrate/20240202191746_add_accountable_to_account.rb
Normal 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
|
7
db/migrate/20240202192214_create_account_depositories.rb
Normal file
7
db/migrate/20240202192214_create_account_depositories.rb
Normal 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
|
7
db/migrate/20240202192231_create_account_credits.rb
Normal file
7
db/migrate/20240202192231_create_account_credits.rb
Normal 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
|
7
db/migrate/20240202192238_create_account_investments.rb
Normal file
7
db/migrate/20240202192238_create_account_investments.rb
Normal 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
|
7
db/migrate/20240202192312_create_account_properties.rb
Normal file
7
db/migrate/20240202192312_create_account_properties.rb
Normal 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
|
7
db/migrate/20240202192319_create_account_vehicles.rb
Normal file
7
db/migrate/20240202192319_create_account_vehicles.rb
Normal 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
|
7
db/migrate/20240202192327_create_account_other_assets.rb
Normal file
7
db/migrate/20240202192327_create_account_other_assets.rb
Normal 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
|
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue