Files
buildfor_life_ops/drizzle
grabowski 3b34458a99 feat(properties): tree-aware readers for expenses, maintenance, checklists
Phase 2. Each service grows a `*ForProperties` (plural) variant that
takes a resolved property id array; the existing single-property
functions now delegate to them with `[propertyId]`. The route layer
will compute the descendant set via getDescendantIds when the user
toggles "include sub-properties" — this commit only adds the readers
behind the scenes.

Also extends the checklist_scope enum with 'property' so checklists
can attach directly to a property and the rollup query has a
well-typed scope to filter on.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 12:51:59 +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:

  • pnpm run db:generate — diff the schema vs. the latest snapshot and emit a new .sql file
  • pnpm run db:migrate — apply pending migrations to DATABASE_URL
  • pnpm run db:push — skip migrations and sync the schema directly (dev only)
  • pnpm 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.