Just write a test for it
a year ago
- #SQL
- #Rust
- #Testing
- Author appreciates Rust for guiding towards best practices.
- Discusses issues with SQL migrations in the bors project during Google Summer of Code 2025.
- Highlights a bug where NOT NULL columns were added without DEFAULT values in populated tables.
- Describes the solution: using sqlparser crate to write a test detecting problematic SQL migrations.
- Emphasizes Rust's ecosystem and tooling for quickly implementing robust solutions.
- Mentions potential future improvements like testing migrations with non-empty databases.