Context
PR #9 review highlighted that idx_observations_project_input_hash was added in runtime bootstrap SQL (CUSTOM_SQL) instead of through drizzle migrations.
Why this matters
- Schema-affecting changes are easier to audit when represented in migration history
- Current runtime SQL includes multiple indexes and triggers created outside drizzle migration files
Scope
- Inventory runtime bootstrap SQL in
src/index.ts
- Decide which statements should move to drizzle migrations versus remain runtime bootstrap
- Move eligible statements into migrations and keep startup idempotent
- Add or update tests to cover migration path for existing databases
Notes
This is intentionally scoped as follow-up to avoid mixing larger schema-process refactors into PR #9.
Context
PR #9 review highlighted that
idx_observations_project_input_hashwas added in runtime bootstrap SQL (CUSTOM_SQL) instead of through drizzle migrations.Why this matters
Scope
src/index.tsNotes
This is intentionally scoped as follow-up to avoid mixing larger schema-process refactors into PR #9.