dbmigrations: An implementation of relational database "migrations"

[ bsd3, database, deprecated, library, program ] [ Propose Tags ]
Deprecated

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]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 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, 2.1.0
Dependencies aeson (<2), base (>=4 && <5), 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), string-conversions (>=0.4), template-haskell, text (>=0.11), time (>=1.4), unordered-containers, yaml [details]
License BSD-3-Clause
Author Jonathan Daugherty <cygnus@foobox.com>
Maintainer Jonathan Daugherty <cygnus@foobox.com>
Category Database
Source repo head: git clone git://github.com/jtdaugherty/dbmigrations.git
Uploaded by JonathanDaugherty at 2022-05-04T02:34:07Z
Distributions
Reverse Dependencies 2 direct, 0 indirect [details]
Executables moo
Downloads 12754 total (41 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-05-04 [all 1 reports]

Readme for dbmigrations-2.1.0

[back to package description]

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.