Simpl-Resultat/src-tauri/src/database
le king fu 5861346eb3
All checks were successful
PR Check / rust (pull_request) Successful in 22m31s
PR Check / frontend (pull_request) Successful in 2m26s
feat(balance): data layer — vehicle_type + custom_label migrations, starters, service (#202)
Bilan axe véhicule (Étape 1) data foundation: separate the fiscal envelope
(now balance_accounts.vehicle_type) from the asset class (the category).

- Migration v12 (additive): add vehicle_type (fiscal enum, nullable) to
  balance_accounts + custom_label to balance_categories; backfill the envelope
  onto ex-tfsa/rrsp accounts (cash stays NULL); defensive recovery of any seed
  i18n_key overwritten by free text (bug I).
- Migration v13 (reclass, conditional/idempotent): re-link ex-tfsa/rrsp accounts
  to the `other` asset class and deactivate the two envelope seeds.
- consolidated_schema.sql: 2 new columns, 5 asset-class seeds (no tfsa/rrsp),
  CELI/REER starters re-pointed to `other` + vehicle_type (avoids NULL FK).
- Types: BalanceVehicleType, custom_label / vehicle_type / category_custom_label.
- Service: normalizeVehicleType + vehicle_type_invalid; CRUD writes the new
  columns; SELECT/JOINs read them back; STARTER_ACCOUNTS + proposeStarterAccounts
  (is_active=1 + vehicle_type) + getStarterCollisions adjusted.
- Tests: Rust chain v9→v13 (snapshot_lines identical, transfers intact, archived
  ex-tfsa covered, seeds deactivated, v13 EXISTS guard, idempotence, CHECK reject)
  + consolidated complete (5 categories, 4 starters, 0 NULL FK); TS service +
  StarterAccountsModal specs. No diff to migrations <= v11.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 20:37:56 -04:00
..
balance_schema.sql feat(balance): add migration v9 schema (5 tables, 7 indexes, seed) 2026-04-25 14:31:50 -04:00
consolidated_schema.sql feat(balance): data layer — vehicle_type + custom_label migrations, starters, service (#202) 2026-06-01 20:37:56 -04:00
mod.rs feat(balance): add migration v9 schema (5 tables, 7 indexes, seed) 2026-04-25 14:31:50 -04:00
schema.sql fix: restore schema.sql to exact v0.2.4 bytes for migration checksum (v0.2.7) 2026-02-14 17:23:36 +00:00
seed_categories.sql Fix app stuck on spinner after v0.4.0 update (GH #9) 2026-02-26 21:54:42 -05:00