A database toolkit
Apache License 2.0
2119
19
93

Manage your database schemas with Atlas CLI

Atlas CLI is an open source tool that helps developers manage their database schemas by applying modern DevOps principles. Contrary to existing tools, Atlas intelligently plans schema migrations for you. Atlas users can use the Atlas DDL (data definition language) to describe their desired database schema and use the command-line tool to plan and apply the migrations to their systems.

Quick Installation

On macOS:

brew install ariga/tap/atlas

Click here to read instructions for other platforms.

Getting Started

Get started with Atlas by following the Getting Started docs. This tutorial teaches you how to inspect a database, generate a migration plan and apply the migration to your database.

Features

  • Inspecting a database: easily inspect your database schema by providing a database URL.
atlas schema inspect -u "mysql://root:pass@localhost:3306/example" > atlas.hcl
  • Applying a migration: generate a migration plan to apply on the database by providing an HCL file with the desired Atlas schema.
atlas schema apply -u "mysql://root:pass@localhost:3306/example" -f atlas.hcl
  • Declarative Migrations vs. Versioned Migrations: Atlas offers two workflows. Declarative migrations allow the user to provide a desired state and Atlas gets the schema there instantly (simply using inspect and apply commands). Alternatively, versioned migrations are explicitly defined and assigned a version. Atlas can then bring a schema to the desired version by following the migrations between the current version and the specified one.

About the Project

Read more about the motivation of the project here.

Supported Databases

MySQL, MariaDB, PostgresSQL, SQLite, TiDB, CockroachDB

Contributors

a8m
rotemtam
masseelch
yonidavidson
hilakashai
zeevmoney
priteshtm
elad-n
ronenlu
giautm
gneyal
svstanev
vladdoster
ericyd
sashamelentyev
tmc
adambabik
CGA1123
fishead
ivanvanderbyl
fuziontech
HatsuneMiku3939
michaelboke
vsychov
iwata
edigaryev
omarhachach
crossworth
Phuurl
ofpiyush
serpulga
shani-a
tprebs
devnode
dito
int-2147483647
kinggor1010
ndrpnt
unknowingknow