Coder Social home page Coder Social logo

skeema's Introduction

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 partitioned tables, spatial types, and virtual columns -- 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.

License

Copyright 2019 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.

skeema's People

Contributors

blueish avatar efixler avatar evanelias avatar johlo avatar

Watchers

 avatar  avatar

skeema's Issues

Foreign key linting

What needs to be resolved before a PR to upstream

  • Unit tests
  • Comments
  • Code assumes Innodb, how to handle
  • Integration tests?
  • Referenced keys should be both non-unique and non-null?
  • createFullKey should be createFullInnodbKey and moved to tengo?
  • Add warning about adding index when missing from child table

Future stuff

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.