Back to directory

Dbmate

A standalone, framework-agnostic command-line tool that keeps a database schema in sync across developers and production servers using plain SQL migrations.

Dbmate

Dbmate is a database migration tool distributed as a single self-contained binary, usable with any language or framework, including Go, Node.js, Python, Ruby, PHP, Rust, and C++. Migrations are written in plain SQL, are timestamp-versioned to avoid conflicts between developers working at the same time, and run atomically inside a transaction.

It supports MySQL, MariaDB, PostgreSQL, SQLite, and ClickHouse, reads its database connection from an environment variable or the command line, can create and drop databases for development and testing, and can export a schema.sql file so schema changes are easy to diff in git. It can also be embedded as a library and used to run migrations bundled inside another program.

It is written in Go and released under the MIT license.

More in CLI tools

See all 181
  • grev

    github.com

    A set of Unix coreutils-style filters — grep, sort, cut and more — that answer a plain-language question about each record instead of matching a pattern, using a small decision model.

  • A Node.js script that exports a Google Doc to HTML and CSS with high fidelity, preserving headings, spacing, alignment, bullet lists, images and right-to-left text.

  • gpusched

    github.com

    A VRAM-aware GPU job scheduler for a single machine: declare how much memory each shell command needs, and it places jobs the moment a GPU has room and reports when a guess was wrong.