Code Monkey home page Code Monkey logo

sqitch's Introduction

App/Sqitch version v1.2.2-dev

Release Coverage Database
CPAN OSes Exasol Oracle
Docker Perl Firebird Snowflake
Homebrew Coverage MySQL SQLite
Debian Postgres Vertica

Sqitch is a database change management application. It currently supports PostgreSQL 8.4+, SQLite 3.7.11+, MySQL 5.0+, Oracle 10g+, Firebird 2.0+, Vertica 6.0+, Exasol 6.0+ and Snowflake.

What makes it different from your typical migration approaches? A few things:

  • No opinions

    Sqitch is not tied to any framework, ORM, or platform. Rather, it is a standalone change management system with no opinions about your database engine, application framework, or development environment.

  • Native scripting

    Changes are implemented as scripts native to your selected database engine. Writing a PostgreSQL application? Write SQL scripts for psql. Writing an Oracle-backed app? Write SQL scripts for SQL*Plus.

  • Dependency resolution

    Database changes may declare dependencies on other changes -- even on changes from other Sqitch projects. This ensures proper order of execution, even when you've committed changes to your VCS out-of-order.

  • Deployment integrity

    Sqitch manages changes and dependencies via a plan file, and employs a Merkle tree pattern similar to Git and Blockchain to ensure deployment integrity. As such, there is no need to number your changes, although you can if you want. Sqitch doesn't much care how you name your changes.

  • Iterative Development

    Up until you tag and release your project, you can modify your change deployment scripts as often as you like. They're not locked in just because they've been committed to your VCS. This allows you to take an iterative approach to developing your database schema. Or, better, you can do test-driven database development.

Want to learn more? The best place to start is in the tutorials:

There have also been a number of presentations on Sqitch:

  • PDX.pm Presentation: Slides from "Sane Database Management with Sqitch", presented to the Portland Perl Mongers in January, 2013.

  • PDXPUG Presentation: Movie of "Sane Database Management with Sqitch", presented to the Portland PostgreSQL Users Group in September, 2012.

  • Agile Database Development: Slides from a three-hour tutorial session on using Git, test-driven development with pgTAP, and change management with Sqitch, updated in January, 2014.

Installation

To install Sqitch from a distribution download, type the following:

perl Build.PL
./Build installdeps
./Build
./Build test
./Build install

To install Sqitch and all of its dependencies into a single directory named sqitch_bundle, install the Menlo CPAN client and build the bundle:

cpanm Menlo::CLI::Compat
./Build bundle --install_base sqitch_bundle

After which, Sqitch can be run from ./sqitch_bundle/bin/sqitch. By default, no modules that are included in the core Perl distribution are included. To require that dual-life modules also be bundled, pass --dual_life 1:

./Build bundle --install_base sqitch_bundle --dual_life 1

To include support for a feature in the bundle, pass the --with option naming the feature:

./Build bundle --install_base sqitch_bundle --with postgres --with sqlite

The feature names generally correspond to the supported engines. The currently supported features are:

  • --with postgres: Support for managing PostgreSQL databases
  • --with sqlite: Support for managing SQLite databases
  • --with mysql: Support for managing MySQL databases
  • --with firebird: Support for managing Firebird databases
  • --with oracle: Support for managing Oracle databases
  • --with vertica: Support for managing Vertica databases
  • --with exasol: Support for managing Exasol databases
  • --with snowflake: Support for managing Snowflake databases
  • --with odbc: Include the ODBC driver

To build from a Git clone, first install Dist::Zilla, then use it to install Sqitch and all dependencies:

cpanm Dist::Zilla
dzil authordeps --missing | cpanm
dzil listdeps --missing | cpanm
dzil install

To run Sqitch directly from the Git clone, execute t/sqitch.

To install Sqitch on a specific platform, including Debian- and RedHat-derived Linux distributions and Windows, see the Installation documentation.

License

Copyright (c) 2012-2021 iovation Inc., David E. Wheeler

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

sqitch's People

Contributors

anianz avatar arhuman avatar autarch avatar avesus avatar bokutin avatar carragom avatar clad avatar cosimo avatar dredozubov avatar dtseiler avatar ealter avatar fluca1978 avatar francois avatar guedes avatar hartzell avatar jhannah avatar jwarlander avatar kwakwaversal avatar matthieu-foucault avatar mlawren avatar olshevskiy87 avatar perigrin avatar rwstauner avatar schwern avatar ssoriche avatar stefansbv avatar theory avatar tsibley avatar wollmers avatar yati-sagade avatar

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.