ratchet

command module
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: MIT Imports: 4 Imported by: 0

README

ratchet

ratchet is a schema migration tool for Cloud Spanner.

Installation

Download the binary from GitHub Releases and drop it in your $PATH.

Usage

You can use by following steps.

1. Initialize the schema for migration
$ ratchet init -p {your-project-id} -i {spanner-instance} -d {spanner-database}

Creating migration table...
Migration table has been created!!

This will create a table to manage migration.

2. Create migration files
$ ratchet new

New migration file has been created in migrations/2021-02-07_07-38-03_23229.sql

The above command makes a migration file for DDL. If you want to make files for DML or Partitioned-DML, please add --dml or --pdml opition.

3. Run migrations
$ ratchet run -p {your-project-id} -i {spanner-instance} -d {spanner-database}

Migration started.
running 2021-02-07_07-38-03_23229 ... done.
Migration completed!

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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