Copyright | (c) 2014 Andreas Meingast <ameingast@gmail.com> |
---|---|
License | BSD-style |
Maintainer | ameingast@gmail.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | None |
Language | Haskell2010 |
Migration library for postgresql-simple.
- runMigration :: MigrationContext -> IO (MigrationResult String)
- data MigrationContext = MigrationContext {}
- data MigrationCommand
- data MigrationResult a
- type ScriptName = String
Documentation
runMigration :: MigrationContext -> IO (MigrationResult String) Source
Executes migrations inside the provided MigrationContext
.
data MigrationContext Source
The MigrationContext
provides an execution context for migrations.
MigrationContext | |
|
data MigrationCommand Source
MigrationCommand
determines the action of the runMigration
script.
MigrationInitialization | Initializes the database with a helper table containing meta information. |
MigrationDirectory FilePath | Executes migrations based on SQL scripts in the provided |
MigrationFile ScriptName FilePath | Executes a migration based on script located at the provided
|
MigrationScript ScriptName ByteString | Executes a migration based on the provided bytestring. |
data MigrationResult a Source
A sum-type denoting the result of a migration.
MigrationError a | There was an error in script migration. |
MigrationSuccess | All scripts have been executed successfully. |
Eq a => Eq (MigrationResult a) | |
Ord a => Ord (MigrationResult a) | |
Read a => Read (MigrationResult a) | |
Show a => Show (MigrationResult a) |
type ScriptName = String Source
The name of a script. Typically the filename or a custom name when using Haskell migrations.