Copyright | (c) 2015 Mark Fine |
---|---|
License | MIT |
Maintainer | Mark Fine <[email protected]> |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Database.PostgreSQL.Schema
Description
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.