- Update SQLite foreign key constraint implementation to use batch operations
- Add helper function to detect existing constraints
- Use batch_alter_table context manager for SQLite compatibility
- Improve error handling in downgrade operations for SQLite compatibility
- Add better error messages for debugging