What does it do?
Write table definitions in db! and migrations in sql, then declare the query results that must remain unchanged before and after the migration. #sql_check returns data that violates those conditions and a script to reproduce the issue in SQLite, a proof result, or an inconclusive result. Found counterexamples can be kept as tests, and the Lean kernel checks written proofs. Unsupported SQL is rejected.
Key features
- Declare query results that SQL migrations must preserve
- Find violating data and a SQLite reproduction script
- Record found counterexamples as tests
- Check migration proofs with the Lean kernel
- Reject SQL outside the supported model