Track database schema changes during a sprint where multiple people are modifying table structures.
Generate a SQL migration script from the diff between two saved schema snapshots.
Set up watch mode during active development to get alerted the moment someone alters a table.
dbsnapshot is a command-line tool that takes point-in-time snapshots of a database's structure and lets you compare any two snapshots to see what changed. The idea is similar to how version control tracks changes in code files, but applied to the shape of a database rather than its contents. The tool supports three database systems: PostgreSQL, MySQL, and SQLite. Running the capture command saves the current schema as a JSON file with a timestamp and a name you choose. You can then list saved snapshots, compare any two of them to get a diff showing added, modified, and removed columns or tables, or export the differences as SQL statements that could be applied as a migration script. A watch mode is also included, which checks the schema at a regular interval and alerts when something changes. This could be useful during active development when multiple people are touching the database structure. The diff output is formatted to show additions with a plus sign, modifications with a tilde, and removals with a minus sign, along with a summary count at the bottom. The README shows an example where one column was added, one was changed from a shorter to a longer text type, and one legacy column was removed. The repository is a shell script project licensed under MIT. The README is brief and does not include installation instructions or detail how the tool connects to databases. It is marked as ready for GitHub Codespaces, which suggests the intent is for it to work in a browser-based development environment without requiring local setup.
← xb1jaa on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.