1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-19 05:09:38 +02:00
Maybe/db/migrate/20240202015428_create_accounts.rb

17 lines
395 B
Ruby
Raw Normal View History

2024-02-02 09:05:04 -06:00
class CreateAccounts < ActiveRecord::Migration[7.2]
def change
create_table :accounts, id: :uuid do |t|
t.string :type
t.string :subtype
t.references :family, null: false, foreign_key: true, type: :uuid
t.string :name
t.bigint :balance, default: 0
t.string :currency, default: "USD"
t.timestamps
end
add_index :accounts, :type
end
end