| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Refurb.Cli
Description
Module with optparse-applicative parsers for and datatypes to represent the command line arguments.
- newtype GoNoGo = GoNoGo Bool
- newtype PreMigrationBackup = PreMigrationBackup FilePath
- newtype InstallSeedData = InstallSeedData Bool
- data Command
- commandMigrateParser :: ParserInfo Command
- commandShowLogParser :: ParserInfo Command
- commandShowMigrationParser :: ParserInfo Command
- commandBackupParser :: ParserInfo Command
- data Opts = Opts {}
- optsParser :: ParserInfo Opts
Documentation
Newtype wrapper for the --execute boolean (True if given, False if omitted)
newtype PreMigrationBackup Source #
Newtype wrapper for the --backup-first option to the migrate command.
Constructors
| PreMigrationBackup FilePath |
Instances
newtype InstallSeedData Source #
Newtype wrapper for the --seed boolean (True if given, False if omitted)
Constructors
| InstallSeedData Bool |
Instances
The various top level commands that can be requested by the user
Constructors
| CommandMigrate GoNoGo (Maybe PreMigrationBackup) InstallSeedData | Migrate the database or show what migrations would be applied, possibly backing up beforehand. |
| CommandShowLog | Show the migration status. |
| CommandShowMigration FQualifiedKey | Show status of a particular migration with its log output. |
| CommandBackup FilePath | Back up the database. |
commandMigrateParser :: ParserInfo Command Source #
Option parser for the migrate command
commandShowLogParser :: ParserInfo Command Source #
Option parser for the show-log command
commandShowMigrationParser :: ParserInfo Command Source #
Option parser for the show-migration command
commandBackupParser :: ParserInfo Command Source #
Option parser for the backup command
Structure holding the parsed command line arguments and options.
Constructors
| Opts | |
Fields | |
optsParser :: ParserInfo Opts Source #
Parser for the command line arguments