Skip to content
r.

sqldef

sqldef/sqldef · Public GitHub repository

Idempotent schema management for MySQL, PostgreSQL, SQLite, and SQL Server

Open project in RepoShelf

Open the project to try its demo, view the repository, or save it to your collection. Repository and demo actions use RepoShelf’s sign-in flow.

sqldef live demo screenshot
Captured from the live demo · 2026-11-06

About this project

Author-written excerpt from the project README.

sqldef is the easiest idempotent schema management tool for MySQL, PostgreSQL, SQLite3, and SQL Server that uses plain SQL DDLs. Define your desired schema in SQL, and sqldef generates and applies the migrations to update your database.

With sqldef, you maintain a single SQL file with your complete schema. To modify your schema - add columns, change constraints, or create indexes - simply edit this file. sqldef compares desired against current schema and generates the appropriate DDLs, ensuring your database reaches the desired state from any starting point.

Each database gets its own command (mysqldef, psqldef, sqlite3def, mssqldef) that mimics the connection options of the native database client, making it familiar and easy to integrate into existing workflows. The tool comes as a single binary with no dependencies, and provides idempotent operations that are safe to run multiple times.

Requirements and intended audience

sqldef is the easiest idempotent schema management tool for MySQL, PostgreSQL, SQLite3, and SQL Server that uses plain SQL DDLs. Define your desired schema in SQL, and sqldef generates and applies the migrations to update your database.

Not recorded: account, external api key, paid service, self-hosting. Missing information does not mean there are no requirements.

Statements extracted from the author’s documentation · Checked 2026-10-25. Source: https://github.com/sqldef/sqldef/blob/master/README.md

Recorded maintenance information

Last recorded source update: 2026-11-04. Saved release: v3.11.26 · 2026-10-01. These dates do not guarantee ongoing maintenance.

Technologies
Go
Licence
No licence detected. No recognised licence was detected in the saved metadata. A public repository does not automatically grant permission to reuse its code. Review the repository terms before reusing its code.
Demo check
A public page loaded on 2026-11-06. This does not test every feature.

Browse related categories