DB Schema Sync tool
- Rust
Why
Most projects need a database, and all of those (yes, all of 'em) rely on a schema for their data, even if the schema is denied its existence. Code changes, which warrant changes in the schema, prompt a need to **execute code to update the database**. For databases, a file with schema definitions isn't the source of truth because it will be out of sync with the real database. The DB Schema Sync tool was created to help make this a little easier.
How
First, schemas are defined in a file using the Database Markup Language (DBML). This is meant to be the source of truth in a database-agnostic way. When you change the file, you would run the tool to automatically update the database. You can also check if a database is in sync with your schema file, i.e. diff the two schemas to see the differences.