Files
buildfor_life_ops/drizzle
grabowski 3417ed6698 feat(properties): expenses tab with electricity+water chart
- expense_kind enum (utilities + maintenance/repair/cleaning/insurance/tax/rent/other)
- property_expenses table with optional link to a property_accounts row
  (preserves history via ON DELETE SET NULL)
- services/expenses.ts: CRUD + 12-month monthly series aggregation +
  year-to-date summary by kind
- /properties/[id]/expenses tab: inline SVG line chart for electricity +
  water last 12 months (no chart library), summary card, add/edit/delete
  inline with account linking when kind matches
2026-04-23 15:32:20 +07:00
..

drizzle migrations

This directory holds SQL migrations generated by drizzle-kit generate from the TypeScript schema in src/lib/server/db/schema/.

Commands:

  • npm run db:generate — diff the schema vs. the latest snapshot and emit a new .sql file
  • npm run db:migrate — apply pending migrations to DATABASE_URL
  • npm run db:push — skip migrations and sync the schema directly (dev only)
  • npm run db:studio — open the Drizzle Studio UI

After every generate, review the SQL for surprises — especially around:

  • enum additions (non-blocking) vs. removals (require a separate data migration)
  • index changes on large tables (use CONCURRENTLY in production rollouts)
  • anything touching assets.custom_fields — see project_buildfor_life_ops.md memory for the immutable-key policy.