mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 12:04:08 +00:00
Scaffold out basic transactions model and UI (#478)
* Transaction scaffold * Rough in transaction views * Fix sort order * Fix mass assignment issue * Fix test * Simplify CI workflow * Don't seed db before test
This commit is contained in:
13
db/migrate/20240223162105_create_transactions.rb
Normal file
13
db/migrate/20240223162105_create_transactions.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
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
|
||||
Reference in New Issue
Block a user