The dbmigrations package

[Tags: bsd3, library, program]

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]

Properties

Versions0.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
Change logNone available
Dependenciesbase (==4.*), containers (>=0.2 && <0.4), directory (>=1.0 && <1.2), fgl (==5.4.*), filepath (==1.1.*), HDBC (>=2.2.1 && <2.3), HDBC-postgresql, HDBC-sqlite3, HUnit (==1.2.*), mtl (==1.1.*), parsec (==2.1.*), process (==1.0.*), random (==1.0.*), template-haskell, time (==1.1.*) [details]
LicenseBSD3
AuthorJonathan Daugherty <drcygnus@gmail.com>
MaintainerJonathan Daugherty <drcygnus@gmail.com>
CategoryDatabase
Home pagehttp://repos.codevine.org/dbmigrations/
Executablesmoo, dbmigrations-tests
UploadedTue Nov 9 03:40:16 UTC 2010 by JonathanDaugherty
DistributionsNixOS:0.9, Stackage:0.9
Downloads2003 total (176 in last 30 days)
Votes
0 []
StatusDocs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

Flags

NameDescriptionDefaultType
testingBuild for testingDisabledAutomatic

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

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for dbmigrations-0.3

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!