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 any HDBC-supported database, although at present only PostgreSQL is fully supported. To get started, see the included README and MOO.TXT files and the usage output for the moo command.


[Skip to Readme]

Modules

[Last Documentation]

  • Database
    • Schema
      • Database.Schema.Migrations
        • Database.Schema.Migrations.Backend
          • Database.Schema.Migrations.Backend.HDBC
        • Database.Schema.Migrations.Dependencies
        • Database.Schema.Migrations.Filesystem
        • Database.Schema.Migrations.Migration
        • Database.Schema.Migrations.Store

Flags

Automatic Flags
NameDescriptionDefault
testing

Build for testing

Disabled
store-manager

Build the experimental / incomplete store-manager program

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

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 base (>=4 && <5), containers (>=0.2 && <0.3), directory (>=1.0 && <1.2), fgl (>=5.4 && <5.5), filepath (>=1.1 && <1.2), HDBC, HDBC-postgresql, hscurses (>=1.3 && <1.4), HUnit (>=1.2 && <1.3), mtl (>=1.1 && <1.2), parsec (>=2.1 && <2.2), process (>=1.0 && <1.1), random (>=1.0 && <1.1), template-haskell, time (>=1.1 && <1.2) [details]
License BSD-3-Clause
Author Jonathan Daugherty <drcygnus@gmail.com>
Maintainer Jonathan Daugherty <drcygnus@gmail.com>
Category Database
Home page http://repos.codevine.org/dbmigrations/
Uploaded by JonathanDaugherty at 2009-09-08T05:03:34Z
Distributions
Reverse Dependencies 2 direct, 0 indirect [details]
Executables store-manager, moo, test
Downloads 12786 total (68 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-12-31 [all 7 reports]

Readme for dbmigrations-0.1

[back to package description]
dbmigrations
------------

This package contains 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 operates on two logical entities:

 - The "backend", which is the relational database whose schema you
   want to manage.

 - The "migration store" (or simply "store"), which is 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 backends for
   migrations.

Migration file format
---------------------

While the "moo" management tool included in this package will create
new migration files for you, a description of the file format follows.
A migration used by this package is a structured document containing
these fields:

   Description: (optional) a textual description of the migration

  Dependencies: (required, but may be empty) a whitespace-separated
                list of migration names on which the migration
                depends; these names are the migration filenames
                without the filename extension

       Created: The UTC date and time at which this migration was
                created

         Apply: The SQL necessary to apply this migration to the
                database

        Revert: (optional) The SQL necessary to revert this migration
                from the database

The format of this file is somewhat flexible; any of the above fields
may take up a single line, with all text coming after the field name
and colon constituting the field's value; in the case of multi-line
values (such as Apply and Revert SQL), multiple lines may follow the
field name and colon, as long as they are indented by at least one
whitespace character.  The migration file format also supports
comments, which are preceded by "#".

moo: the management tool
------------------------

This package includes one program, "moo".  For information about moo's
usage and features, please see the file MOO.TXT.

Installation
------------

If you've obtained this package in source form and would like to
install it, you'll need the "cabal" program.  To install this package,
run:

  cabal install

Getting the source
------------------

If you've obtained this package by some other means and would like to
get a copy of the source code, you can do so with darcs:

  darcs get http://repos.codevine.org/dbmigrations

For more information about the "darcs" revision control system, please
see:

  http://darcs.net/

Submitting patches
------------------

I'll gladly consider accepting patches to this package; please do not
hesitate to send them to me with "darcs send", or mail them to me
manually (see below).  If you'd like to send me a patch, I'll be more
likely to accept it 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.

Submitting bug reports and feedback
-----------------------------------

If you've found a bug or would like to provide any feedback on the
design, implementation, or behavior of this library or its programs,
please do not hesitate to contact me directly at

  drcygnus AT gmail DOT com

Enjoy!