parserOptCommonDb :: Parser OptCommonDb
parserOptCommonDb =
  OptCommonDb <$>
  boolFlag (long "emulate" <> short 'e' <> help "Perform changes but rollback") <*>
  boolFlag
    (long "print" <> short 'p' <> help "Print SQL code instead of executing") <*>
  strOption
    (long "connection" <>
     short 'c' <> help "Database connection URI" <> val "postgresql://") <*>
  boolFlag
    (long "permit-data-deletion" <> help "Permit deletion of columns and tables") <*>
  option
    justStr
    (long "sql-log" <>
     help
       ("If specified, log SQL statements to given file. " <>
        "Existing logfiles will be extended, not deleted.") <>
     value Nothing <> metavar "<log file>") <*>
  boolFlag
    (long "sql-log-hide-rollbacks" <>
     help
       "Hide ROLLBACK and SAVEPOINT statements. Useful for creating migration code via --log-sql.")
parserOptCommonDb :: Parser OptCommonDb
parserOptCommonDb =
  OptCommonDb <$>
  boolFlag (long "emulate" <> short 'e' <> help "Perform changes but rollback") <*>
  boolFlag
    (long "print" <> short 'p' <> help "Print SQL code instead of executing") <*>
  strOption
    (long "connection" <>
     short 'c' <> help "Database connection URI" <> val "postgresql://") <*>
  boolFlag
    (long "permit-data-deletion" <> help "Permit deletion of columns and tables") <*>
  option
    justStr
    (long "sql-log" <>
     help
       ("If specified, log SQL statements to given file. " <>
        "Existing logfiles will be extended, not deleted.") <>
     value Nothing <> metavar "<log file>") <*>
  boolFlag
    (long "sql-log-hide-rollbacks" <>
     help
       "Hide ROLLBACK and SAVEPOINT statements. Useful for creating migration code via --log-sql.")
parserOptCommonDb =
  OptCommonDb <$>
  boolFlag (long "emulate" <> short 'e' <> help "Perform changes but rollback") <*>
  boolFlag
    (long "print" <> short 'p' <> help "Print SQL code instead of executing") <*>
  strOption
    (long "connection" <>
     short 'c' <> help "Database connection URI" <> val "postgresql://") <*>
  boolFlag
    (long "permit-data-deletion" <> help "Permit deletion of columns and tables") <*>
  option
    justStr
    (long "sql-log" <>
     help
       ("If specified, log SQL statements to given file. " <>
        "Existing logfiles will be extended, not deleted.") <>
     value Nothing <> metavar "<log file>") <*>
  boolFlag
    (long "sql-log-hide-rollbacks" <>
     help
       "Hide ROLLBACK and SAVEPOINT statements. Useful for creating migration code via --log-sql.")