hazel
A tool that compares a target schema in a SQL file with a SQLite database and generates change statements.
What does it do?
First, export an existing database schema to a file, then write the desired changes, such as adding a column, in a SQL file. hazel compares the target and current schemas and generates the necessary DDL. It uses ALTER TABLE for changes SQLite supports and permitted table reconstruction when needed. Its workflow guides you through reviewing the generated statements before running them in a single transaction.
Key features
- Record an existing database schema in a file
- Compare the target schema in a SQL file with the current schema
- Generate DDL for the differences and review it before applying
- Run schema changes in a single transaction