docs: add bill_history_ranges cleanup to FUTURE.md

This commit is contained in:
null 2026-05-09 15:20:17 -05:00
parent d5057a6325
commit 6c730635ec
1 changed files with 16 additions and 0 deletions

View File

@ -688,3 +688,19 @@ Migration failures don't produce clear error messages or logs, making debugging
- Include timing: `[migration] v0.20.0 completed in 234ms`
- Log precondition checks: `[migration] Checking: table_exists('users')`
- Error log with context: `[migration-error] v0.20.0 failed: UNIQUE constraint failed on users.username`
---
## Migration Cleanup: bill_history_ranges Outside Versioned Array
**Priority:** LOW
**Status:** PENDING
**Added:** 2026-05-09 by Ripley
**Description:**
The `bill_history_ranges` table creation and a few other inline items are still outside the versioned migrations array in `db/database.js`. They run on every startup via `CREATE TABLE IF NOT EXISTS` but aren't tracked in `schema_migrations`, so they bypass the version tracking system.
**Implementation Notes:**
- Move `bill_history_ranges` and any other orphaned inline migrations into the versioned migrations array
- Assign appropriate version numbers
- Ensure idempotent `run()` functions for each
- Verify they get tracked in `schema_migrations` after the move