TiloBox
Back to directory
sqldef project preview

sqldef

Idempotent schema management tool for MySQL, PostgreSQL, SQLite3, and CockroachDB.

LicenseMIT
GitHub stars3.4k
Last commit5 days ago
Tags5 topics
Idempotent Ddl MigrationDeclarative Database SchemaMysql Postgres Schema SyncAlter Table Diff EngineDeveloper Tools
Overview

Why consider sqldef?

sqldef is an open-source declarative schema migration tool written in Go. It compares your desired SQL DDL schema file with your live database and automatically applies the minimum required ALTER TABLE operations idempotently.

Guided learning

Learn sqldef by building

Practical setup notes, real use cases, and copy-ready examples in one focused guide.

1 min read 2 sections
In this guide2 sections

Overview of sqldef

sqldef eliminates complex sequential migration scripts by calculating precise schema diffs.

Quickstart

bash
1psqldef -U postgres -d mydb --dry-run < schema.sql
2psqldef -U postgres -d mydb < schema.sql

Run in CI/CD pipelines to keep production database tables in sync with git schema definitions.

sqldef is licensed under the permissive MIT License.

Related tools

More options with a similar category or technology profile.

sqldef FAQs

sqldef is listed as a Developer Tools tool on TiloBox. Review the overview, features, and official documentation on this page to decide whether it solves your specific workflow.

Start with the project's GitHub repository for supported installation and deployment instructions. Test the setup with representative data or a small project before rolling it out more widely.

sqldef is listed under the MIT license. Read the complete license text and the project's notices before using, modifying, or distributing the software.

Production readiness depends on your requirements. Review maintenance activity, security practices, documentation, backup and upgrade procedures, and compatibility with your stack; then validate it in a non-production environment.

sqldef is listed as an alternative to Liquibase. Compare the core workflow, deployment model, integrations, and licensing against your must-have requirements before switching.