Copyright | (c) 2015 Mark Fine |
---|---|
License | MIT |
Maintainer | Mark Fine <mark.fine@gmail.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Functions for working with PostgreSQL migrations.
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.