Schema management CLI for MySQL
Перейти к файлу
Rashiq fbbd0d5658
Merge pull request #5 from github/rashiq-create_codeowners
2021-05-09 22:48:44 +02:00
.github Create CODEOWNERS 2021-05-06 18:51:17 +02:00
applier Fixes for changes in MySQL 8.0.19 2020-01-28 23:54:09 -05:00
doc diff/push: Support for tables using Percona Server column compression 2020-02-14 01:03:41 -05:00
dumper Fixes for changes in MySQL 8.0.19 2020-01-28 23:54:09 -05:00
fs MariaDB 10.3+: support INVISIBLE columns 2020-01-10 13:04:53 -05:00
linter Fixes for changes in MySQL 8.0.19 2020-01-28 23:54:09 -05:00
testdata Merge branch 'partitioning' 2019-11-21 17:30:06 -05:00
util Add new option temp-schema-binlog controlling workspace DDL replication 2019-11-04 18:34:39 -05:00
vendor diff/push: Support for tables using Percona Server column compression 2020-02-14 01:03:41 -05:00
workspace Fixes for changes in MySQL 8.0.19 2020-01-28 23:54:09 -05:00
.gitignore travis CI: auto-goreleaser upon tagging 2018-07-11 16:09:28 -04:00
.goreleaser.yml goreleaser: config updates 2019-09-06 12:54:04 -04:00
.travis.yml Internal dependency management: use Go modules, not Dep 2019-09-04 01:00:27 -04:00
LICENSE Add skeleton README, along with NOTICE and LICENSE (Apache v2) 2016-10-18 17:51:05 -04:00
NOTICE Docs: Update copyright year to 2020 [ci skip] 2020-01-02 19:33:41 -05:00
README.md Docs: Update copyright year to 2020 [ci skip] 2020-01-02 19:33:41 -05:00
cmd_add_env.go Fixes for changes in MySQL 8.0.19 2020-01-28 23:54:09 -05:00
cmd_diff.go Major internal refactor to use subpackages 2018-10-26 18:04:46 -04:00
cmd_format.go Add new option temp-schema-binlog controlling workspace DDL replication 2019-11-04 18:34:39 -05:00
cmd_init.go Fixes for changes in MySQL 8.0.19 2020-01-28 23:54:09 -05:00
cmd_lint.go Add new option temp-schema-binlog controlling workspace DDL replication 2019-11-04 18:34:39 -05:00
cmd_pull.go Fixes for changes in MySQL 8.0.19 2020-01-28 23:54:09 -05:00
cmd_push.go Merge branch 'partitioning' 2019-11-21 17:30:06 -05:00
exit.go Internal refactor to subdirectory handling 2019-08-29 19:26:38 -04:00
exit_test.go Add integration test suite for extensive coverage 2018-05-25 16:32:57 -04:00
go.mod diff/push: Support for tables using Percona Server column compression 2020-02-14 01:03:41 -05:00
go.sum diff/push: Support for tables using Percona Server column compression 2020-02-14 01:03:41 -05:00
log.go Internal dependency management: use Go modules, not Dep 2019-09-04 01:00:27 -04:00
skeema.go diff/push: Support for tables using Percona Server column compression 2020-02-14 01:03:41 -05:00
skeema_cmd_test.go Fixes for changes in MySQL 8.0.19 2020-01-28 23:54:09 -05:00
skeema_test.go Fixes for changes in MySQL 8.0.19 2020-01-28 23:54:09 -05:00
tools.go Internal dependency management: use Go modules, not Dep 2019-09-04 01:00:27 -04:00

README.md

Skeema

build status code coverage downloads latest release

Skeema is a tool for managing MySQL tables and schema changes in a declarative fashion using pure SQL. It provides a CLI tool allowing you to:

  • Export CREATE TABLE statements to the filesystem, for tracking in a repo (git, hg, svn, etc)
  • Diff changes in the schema repo against live DBs to automatically generate DDL
  • Manage multiple environments (e.g. dev, staging, prod) and keep them in sync with ease
  • Configure use of online schema change tools, such as pt-online-schema-change, for performing ALTERs
  • Convert non-online migrations from frameworks like Rails or Django into online schema changes in production

Skeema supports a pull-request-based workflow for schema change submission, review, and execution. This permits your team to manage schema changes in exactly the same way as you manage code changes. Our new companion CI app for GitHub repos even provides automatic linting of schema change pull requests.

Downloading

Pre-built skeema binaries for Linux and macOS can be downloaded from the releases page.

Compiling

Compiling from scratch requires the Go programming language toolchain, version 1.12 or higher.

To download, build from master, and install (or upgrade) Skeema, run:

go get -u github.com/skeema/skeema

Documentation

Status

The Skeema CLI tool is generally available, having reached the v1 release milestone in July 2018. Prior to that, it was in public beta since October 2016.

The skeema binary is supported on macOS and Linux. No native Windows version is available yet, though the Linux binary works properly under WSL.

Tagged releases are tested against the following databases, all running on Linux:

  • MySQL 5.5, 5.6, 5.7, 8.0
  • Percona Server 5.5, 5.6, 5.7, 8.0
  • MariaDB 10.1, 10.2, 10.3, 10.4

Outside of a tagged release, every commit to the master branch is automatically tested against MySQL 5.6 and 5.7.

A few uncommon MySQL features -- such as spatial indexes and subpartitioning -- are not supported yet. Skeema is able to create or drop tables using these features, but not alter them. The output of skeema diff and skeema push clearly displays when this is the case. You may still make such alters directly/manually (outside of Skeema), and then update the corresponding CREATE TABLE files via skeema pull.

Credits

Created and maintained by @evanelias.

Additional contributions by:

Support for stored procedures and functions generously sponsored by Psyonix.

Support for partitioned tables generously sponsored by Etsy.

License

Copyright 2020 Skeema LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.