- type Migration m = WriterT [Text] (WriterT CautiousMigration m) ()
- parseMigration :: Monad m => Migration m -> m (Either [Text] CautiousMigration)
- parseMigration' :: Monad m => Migration m -> m CautiousMigration
- printMigration :: (MonadBaseControl IO m, MonadIO m) => Migration (SqlPersist m) -> SqlPersist m ()
- getMigration :: (MonadBaseControl IO m, MonadIO m) => Migration (SqlPersist m) -> SqlPersist m [Sql]
- runMigration :: (MonadIO m, MonadBaseControl IO m) => Migration (SqlPersist m) -> SqlPersist m ()
- runMigrationSilent :: (MonadBaseControl IO m, MonadIO m) => Migration (SqlPersist m) -> SqlPersist m [Text]
- runMigrationUnsafe :: (MonadBaseControl IO m, MonadIO m) => Migration (SqlPersist m) -> SqlPersist m ()
- migrate :: (MonadIO m, MonadBaseControl IO m, PersistEntity val) => [EntityDef] -> val -> Migration (SqlPersist m)
- commit :: MonadIO m => SqlPersist m ()
- rollback :: MonadIO m => SqlPersist m ()
Documentation
parseMigration' :: Monad m => Migration m -> m CautiousMigrationSource
printMigration :: (MonadBaseControl IO m, MonadIO m) => Migration (SqlPersist m) -> SqlPersist m ()Source
getMigration :: (MonadBaseControl IO m, MonadIO m) => Migration (SqlPersist m) -> SqlPersist m [Sql]Source
runMigration :: (MonadIO m, MonadBaseControl IO m) => Migration (SqlPersist m) -> SqlPersist m ()Source
runMigrationSilent :: (MonadBaseControl IO m, MonadIO m) => Migration (SqlPersist m) -> SqlPersist m [Text]Source
Same as runMigration
, but returns a list of the SQL commands executed
instead of printing them to stderr.
runMigrationUnsafe :: (MonadBaseControl IO m, MonadIO m) => Migration (SqlPersist m) -> SqlPersist m ()Source
migrate :: (MonadIO m, MonadBaseControl IO m, PersistEntity val) => [EntityDef] -> val -> Migration (SqlPersist m)Source
commit :: MonadIO m => SqlPersist m ()Source
Perform a database commit.
rollback :: MonadIO m => SqlPersist m ()Source
Perform a database rollback.