Files
sure/db/migrate/20250807143819_create_simplefin_accounts.rb
Sholom Ber 9561e73e17 Add SimpleFin database schema
- Create simplefin_items table for SimpleFin connections
- Create simplefin_accounts table for account metadata
- Add simplefin_account_id to accounts table for linking
- Add external_id to transactions for deduplication
- Enable encrypted storage of SimpleFin access URLs
2025-08-07 12:39:15 -04:00

21 lines
593 B
Ruby

class CreateSimplefinAccounts < ActiveRecord::Migration[7.2]
def change
create_table :simplefin_accounts, id: :uuid do |t|
t.references :simplefin_item, null: false, foreign_key: true, type: :uuid
t.string :name
t.string :account_id
t.string :currency
t.decimal :current_balance, precision: 19, scale: 4
t.decimal :available_balance, precision: 19, scale: 4
t.index :account_id
t.string :account_type
t.string :account_subtype
t.jsonb :raw_payload
t.jsonb :raw_transactions_payload
t.timestamps
end
end
end