1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-24 23:59:40 +02:00

Add Live Data to Account Page (#464)

* Add trends, time series, seed data

* Remove test data

* Replace old view values with helpers

* Fix tooltip bugs in D3 chart

* Fix tests

* Fix smoke test

* Add CRUD actions for valuations

* Scaffold out inline editing with Turbo
This commit is contained in:
Zach Gollwitzer 2024-02-20 09:07:55 -05:00 committed by GitHub
parent 298b50a909
commit b5b2d335fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 512 additions and 167 deletions

View file

@ -0,0 +1,16 @@
class CreateValuations < ActiveRecord::Migration[7.2]
def change
create_table :valuations, id: :uuid do |t|
t.string :type, null: false
t.references :account, null: false, type: :uuid, foreign_key: { on_delete: :cascade }
t.date :date, null: false
t.decimal :value, precision: 19, scale: 4, null: false
t.string :currency, default: "USD", null: false
t.timestamps
end
# Since all dates are daily (no concept of time of day), limit account to 1 valuation per day
add_index :valuations, [ :account_id, :date ], unique: true
end
end