postgresql-schema-0.1.13: PostgreSQL Schema Management

Copyright(c) 2015 Mark Fine
LicenseMIT
MaintainerMark Fine <mark.fine@gmail.com>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Database.PostgreSQL.Schema

Contents

Description

Functions for working with PostgreSQL migrations.

Synopsis

Adding Migrations

add :: FilePath -> FilePath -> FilePath -> Sh () Source #

Add a DDL migration file to a migrations directory. Fails if migration file or migrations directory do not exist.

Applying Migrations

bootstrap :: FilePath -> Text -> Text -> Text -> Sh () Source #

Apply bootstrap migrations to a database. Checks if a database has been previously bootstrapped, and applies all bootstrap migrations if it has not been previously bootstrapped. Applies all bootstrap migrations that have not been applied yet and records their application.

converge :: Bool -> FilePath -> Text -> Text -> Text -> Sh () Source #

Apply migrations to a database. Applies all migrations that have not been applied yet and records their application.

Clearing Migrations

clear :: Text -> Text -> Sh () Source #