Files
sure/db/migrate/20260110180000_add_investment_activity_label_to_transactions.rb
Josh Waldrep 52588784d0 Add investment activity detection, labels, and exclusions
- Introduced `InvestmentActivityDetector` to mark internal investment activity as excluded from cashflow and assign appropriate labels.
- Added `exclude_from_cashflow` flag to `entries` and `investment_activity_label` to `transactions` with migrations.
- Implemented rake tasks to backfill and clear investment activity labels.
- Updated `PlaidAccount::Investments::TransactionsProcessor` to map Plaid transaction types to labels.
- Included comprehensive test coverage for new functionality.
2026-01-12 15:35:14 -05:00

9 lines
388 B
Ruby

class AddInvestmentActivityLabelToTransactions < ActiveRecord::Migration[7.2]
def change
# Label for investment activity type (Buy, Sell, Sweep In, Dividend, etc.)
# Provides human-readable context for why a transaction is excluded from cashflow
add_column :transactions, :investment_activity_label, :string
add_index :transactions, :investment_activity_label
end
end