The dbmigrations package

[Tags:bsd3, library, program, test]

A library and program for the creation, management, and installation of schema updates (called migrations) for a relational database. In particular, this package lets the migration author express explicit dependencies between migrations and the management tool automatically installs or reverts migrations accordingly, using transactions for safety. This package is written to support a number of different databases. For packages that support specific databases using this library, see packages named dbmigrations-BACKEND. Each package provides an executable moo-BACKEND for managing migrations. Usage information for the moo- executables can be found in MOO.TXT in this package. This package also includes a conformance test suite to ensure that backend implementations respect the library's required semantics.


[Skip to Readme]

Properties

Versions 0.1, 0.1.1, 0.1.2, 0.2, 0.3, 0.5, 0.6, 0.7, 0.8, 0.8.1, 0.8.2, 0.9, 0.9.1, 1.0, 1.1, 1.1.1, 2.0.0
Dependencies base (==4.*), bytestring (>=0.9), configurator (>=0.2), containers (>=0.2), dbmigrations, directory (>=1.0), fgl (>=5.4), filepath (>=1.1), HDBC (>=2.2.1), HUnit (>=1.2), mtl (>=2.1), random (>=1.0), split (>=0.2.2), template-haskell, text (>=0.11), time (>=1.4), yaml-light (>=0.1) [details]
License BSD3
Author Jonathan Daugherty <cygnus@foobox.com>
Maintainer Jonathan Daugherty <cygnus@foobox.com>
Stability Unknown
Category Database
Source repository head: git clone git://github.com/jtdaugherty/dbmigrations.git
Uploaded Sat Oct 22 20:07:16 UTC 2016 by JonathanDaugherty
Distributions NixOS:2.0.0
Downloads 2968 total (43 in the last 30 days)
Votes
0 []
Status Docs available [build log]
Last success reported on 2016-10-22 [all 1 reports]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for dbmigrations

Readme for dbmigrations-2.0.0

dbmigrations

This package contains a library for the creation, management, and installation of schema updates (called "migrations") for a relational database. In particular, this package lets the migration author express explicit dependencies between migrations. This library is accompanied by a number database-specific packages that contain the management tools to automatically install or revert migrations accordingly.

This package operates on two logical entities:

  • The "backend": the relational database whose schema you want to manage.

  • The "migration store": the collection of schema changes you want to apply to the database. These migrations are expressed using plain text files collected together in a single directory, although the library is general enough to permit easy implementation of other storage representations for migrations.

Getting started

To get started, install the right database-specific dbmigrations package for your database. Current options are:

  • dbmigrations-postgresql
  • dbmigrations-mysql
  • dbmigrations-sqlite

Each package provides a variant of the "moo" management program ("moo-postgresql", "moo-mysql", and "moo-sqlite" respectively) to be used to manage your database schema. See MOO.TXT for details on how to use these tools to manage your database migrations.

Submitting patches

I'll gladly consider accepting patches to this package; please do not hesitate to submit GitHub pull requests. I'll be more likely to accept a patch if you can follow these guidelines where appropriate:

  • Keep patches small; a single patch should make a single logical change with minimal scope.

  • If possible, include tests with your patch.

  • If possible, include haddock with your patch.