refurb-0.2.2.0: Tools for maintaining a database

Safe HaskellNone
LanguageHaskell2010

Refurb.Cli

Description

Module with optparse-applicative parsers for and datatypes to represent the command line arguments.

Synopsis

Documentation

newtype GoNoGo Source #

Newtype wrapper for the --execute boolean (True if given, False if omitted)

Constructors

GoNoGo Bool 

Instances

newtype InstallSeedData Source #

Newtype wrapper for the --seed boolean (True if given, False if omitted)

Constructors

InstallSeedData Bool 

data Command Source #

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

data Opts Source #

Structure holding the parsed command line arguments and options.

Constructors

Opts 

Fields

  • debug :: Bool

    Whether to turn on debug logging to the console

  • colorize :: Bool

    Whether to colorize console output

  • configFile :: FilePath

    The configuration file where (presumably) the database connection information is stored

  • command :: Command

    Which command the user chose and the options for that command

optsParser :: ParserInfo Opts Source #

Parser for the command line arguments