Lane Campbell 66e97a1ee3 fix: refactor migration system to use bundled SQL files
- Remove hardcoded SQL from getMigrationSQL() that returned empty strings
- Create build-time migration bundler script that reads actual .sql files
- Generate migrations-bundle.ts with all migration SQL at build time
- Fix duplicate migration ID (021 -> 026 for add_otp_login)
- Add auto-detection for managed column in collections table
- Improve error handling to continue on "already exists" errors

This fixes the "no such column: managed" error on preview deployments
where migration 011 was marked as applied but SQL was never executed.

馃 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 14:59:23 -08:00
..