atlas

module
v0.8.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2022 License: Apache-2.0

README

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

Directories

Path Synopsis
cmd
atlas Module
internal
ci
sql
sqlcheck
Package sqlcheck provides interfaces for analyzing the contents of SQL files to generate insights on the safety of many kinds of changes to database schemas.
Package sqlcheck provides interfaces for analyzing the contents of SQL files to generate insights on the safety of many kinds of changes to database schemas.
sqltool
Package sqltool contains logic to integrate existing tools like Flyway or Liquibase with the Atlas CLI.
Package sqltool contains logic to integrate existing tools like Flyway or Liquibase with the Atlas CLI.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL