- 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>