shift

module
v0.0.0-...-72364b4 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2020 License: Apache-2.0

README

shift

shift is an application that makes it easy to run online schema migrations for MySQL databases





Who should use it?

shift was designed to solve the following problem - running schema migrations manually takes too much time. As such, it is most effective when schema migrations are taking up too much of your time (ex: for an operations or DBA team at a large organization), but really it can be used by anyone. As of writing this, shift has had no problem running hundreds of migrations a day or running migrations that take over a week to complete.

Features

  • safe, online schema changes (invokes the tried-and-true pt-online-schema-change)
    • supports all "ALTER TABLE...", "CREATE TABLE...", or "DROP TABLE..." ddl
  • a ui where you can see the status of migrations and run them with the click of a button
  • self-service - out of the box, any user can file and run migrations, and an admin is only required to approve the ddl (this is all configurable though)
  • shard support - easily run a single migration on any number of shards

Components

shift consists of 3 components. Each component has its own readme with more details

  • ui: a rails app where you can file, track, and run database migrations
  • runner: a go agent that consumes jobs from an api exposed by the ui
  • pt-osc patch: a patch for pt-online-schema-change from the percona toolkit

Demo

Watch a demo video here

Installation

Read the installation guide here

License

Copyright (c) 2016 Square Inc. Distributed under the Apache 2.0 License. See LICENSE file for further details.

Directories

Path Synopsis
Godeps/_workspace/src/code.google.com/p/goconf/conf
This package implements a parser for configuration files.
This package implements a parser for configuration files.
Godeps/_workspace/src/github.com/codahale/tmpmysqld
Package tmpmysql provides the ability to spin up temporary mysqld instances for testing purposes.
Package tmpmysql provides the ability to spin up temporary mysqld instances for testing purposes.
Godeps/_workspace/src/github.com/go-sql-driver/mysql
Go MySQL Driver - A MySQL-Driver for Go's database/sql package The driver should be used via the database/sql package: import "database/sql" import _ "github.com/go-sql-driver/mysql" db, err := sql.Open("mysql", "user:password@/dbname") See https://github.com/go-sql-driver/mysql#usage for details
Go MySQL Driver - A MySQL-Driver for Go's database/sql package The driver should be used via the database/sql package: import "database/sql" import _ "github.com/go-sql-driver/mysql" db, err := sql.Open("mysql", "user:password@/dbname") See https://github.com/go-sql-driver/mysql#usage for details
Godeps/_workspace/src/github.com/golang/glog
Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.
Package glog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.
Godeps/_workspace/src/gopkg.in/yaml.v2
Package yaml implements YAML support for the Go language.
Package yaml implements YAML support for the Go language.
pkg/dbclient
Create a mysql client and provide query helpers.
Create a mysql client and provide query helpers.
pkg/migration
Provide methods to be run on a migration.
Provide methods to be run on a migration.
pkg/rest
Package rest facilitates interaction with the shift REST api.
Package rest facilitates interaction with the shift REST api.
pkg/runner
Pick up and run migration jobs.
Pick up and run migration jobs.

Jump to

Keyboard shortcuts

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