mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-21 06:09:38 +02:00
14 lines
417 B
Ruby
14 lines
417 B
Ruby
|
class CreateTransactions < ActiveRecord::Migration[7.2]
|
||
|
def change
|
||
|
create_table :transactions, id: :uuid do |t|
|
||
|
t.string :name
|
||
|
t.date :date, null: false
|
||
|
t.decimal :amount, precision: 19, scale: 4, null: false
|
||
|
t.string :currency, default: "USD", null: false
|
||
|
t.references :account, null: false, type: :uuid, foreign_key: { on_delete: :cascade }
|
||
|
|
||
|
t.timestamps
|
||
|
end
|
||
|
end
|
||
|
end
|