Safe Haskell | None |
---|---|
Language | Haskell2010 |
- migrationPrefixDoc :: Migration -> Doc
- migrate :: MonadRefurb m => GoNoGo -> Maybe PreMigrationBackup -> InstallSeedData -> m ()
- applyMigrations :: MonadRefurb m => [Migration] -> m ()
- locLogString :: Loc -> LogStr
- nowLogString :: IO LogStr
Documentation
migrationPrefixDoc :: Migration -> Doc Source #
Helper which produces the standard prefix Doc
for a given migration: migration key:
with color.
migrate :: MonadRefurb m => GoNoGo -> Maybe PreMigrationBackup -> InstallSeedData -> m () Source #
Implement the migrate
command by verifying that seed data is only applied to non-production databases, reading the migration status, and determining
from that status which migrations to apply. If the user requested execution of migrations, delegate to applyMigrations
to actually do the work.
applyMigrations :: MonadRefurb m => [Migration] -> m () Source #
Given a pre-vetted list of Migration
structures to apply to the database, iterate through them and run their check actions (if any) followed by
execution actions with log output captured.
locLogString :: Loc -> LogStr Source #
Format a Loc
in the way we want for logging output - package:module filename:line:column
nowLogString :: IO LogStr Source #
Format the current timestamp in the way we want for logging output - yyyy-mm-dd hh:mm:ss.SSS