Maintainer | Brandon Chinn <brandonchinn178@gmail.com> |
---|---|
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Defines a migration framework for the persistent library.
Synopsis
- newtype MigrateSettings = MigrateSettings {
- versionToLabel :: Version -> Maybe String
- defaultSettings :: MigrateSettings
- validateMigration :: Migration -> Either String ()
- runMigration :: MonadIO m => MigrateBackend -> MigrateSettings -> Migration -> SqlPersistT m ()
- getMigration :: MonadIO m => MigrateBackend -> MigrateSettings -> Migration -> SqlPersistT m [MigrateSql]
Documentation
newtype MigrateSettings Source #
Settings to customize migration steps.
MigrateSettings | |
|
defaultSettings :: MigrateSettings Source #
Default migration settings.
runMigration :: MonadIO m => MigrateBackend -> MigrateSettings -> Migration -> SqlPersistT m () Source #
Run the given migration. After successful completion, saves the migration to the database.
getMigration :: MonadIO m => MigrateBackend -> MigrateSettings -> Migration -> SqlPersistT m [MigrateSql] Source #
Get the SQL queries for the given migration.