flexchma

This module is used to install and upgrade the flexter metadata database. It’s based on Liquibase database version control tool.

Parameters

To get all the supported merge2er parameters the following command can be used:

$ flexchma --help

All the compatible paramters that can be used are listed:

Usage: flexchma [GLOBAL OPTIONS] [COMMAND] [COMMAND OPTIONS]
Command-specific help: "flexchma <command-name> --help"


Main Commands:

  update                          Deploy any changes in the changelog file that
                                  have not been deployed

  update-sql                      Generate the SQL to deploy changes in the
                                  changelog which have not been deployed

Required Options:
(unless is already in the flexter.conf settings)

 -M <value>, --username=<value>   Database username

 -w <value>, --password=<value>   Database password. If values is PROMPT,
                                  Liquibase will prompt for a password

 -m <value>, --url=<value>        Database URL

Other Commands:

  calculate-checksum              Calculates and prints a checksum for the
                                  changeset

  changelog-sync                  Marks all changes as executed in the database

  changelog-sync-sql              Output the raw SQL used by Liquibase when
                                  running changelogSync

  changelog-sync-to-tag           Marks all undeployed changesets as executed, up
                                  to a tag

  changelog-sync-to-tag-sql       Output the raw SQL used by Liquibase when
                                  running changelogSyncToTag

  clear-checksums                 Clears all checksums

  db-doc                          Generates JavaDoc documentation for the
                                  existing database and changelogs

  diff                            Outputs a description of differences.  If you
                                  have a Liquibase Pro key, you can output the
                                  differences as JSON using the --format=JSON
                                  option

  diff-changelog                  Compare two databases to produce changesets and
                                  write them to a changelog file

  drop-all                        Drop all database objects owned by the user

  execute-sql                     Execute a SQL string or file

  future-rollback-count-sql       Generates SQL to sequentially revert <count>
                                  number of changes

  future-rollback-from-tag-sql    Generates SQL to revert future changes up to
                                  the specified tag

  future-rollback-sql             Generate the raw SQL needed to rollback
                                  undeployed changes

  generate-changelog              Generate a changelog

  history                         List all deployed changesets and their
                                  deployment ID

  init                            < Init commands >

  list-locks                      List the hostname, IP address, and timestamp of
                                  the Liquibase lock record

  mark-next-changeset-ran         Marks the next change you apply as executed in
                                  your database

  mark-next-changeset-ran-sql     Writes the SQL used to mark the next change you
                                  apply as executed in your database

  release-locks                   Remove the Liquibase lock record from the
                                  DATABASECHANGELOG table

  rollback                        Rollback changes made to the database based on
                                  the specific tag

  rollback-count                  Rollback the specified number of changes made
                                  to the database

  rollback-count-sql              Generate the SQL to rollback the specified
                                  number of changes

  rollback-sql                    Generate the SQL to rollback changes made to
                                  the database based on the specific tag

  rollback-to-date                Rollback changes made to the database based on
                                  the specific date

  rollback-to-date-sql            Generate the SQL to rollback changes made to
                                  the database based on the specific date

  snapshot                        Capture the current state of the database

  snapshot-reference              Capture the current state of the reference
                                  database

  status                          Generate a list of pending changesets

  tag                             Mark the current database state with the
                                  specified tag

  tag-exists                      Verify the existence of the specified tag

  unexpected-changesets           Generate a list of changesets that have been
                                  executed but are not in the current changelog

  update                          Deploy any changes in the changelog file that
                                  have not been deployed

  update-count                    Deploy the specified number of changes from the
                                  changelog file

  update-count-sql                Generate the SQL to deploy the specified number
                                  of changes

  update-sql                      Generate the SQL to deploy changes in the
                                  changelog which have not been deployed

  update-testing-rollback         Updates database, then rolls back changes
                                  before updating again. Useful for testing
                                  rollback support

  update-to-tag                   Deploy changes from the changelog file to the
                                  specified tag

  update-to-tag-sql               Generate the SQL to deploy changes up to the tag

  validate                        Validate the changelog for errors

Global Options:

  --allow-duplicated-changeset-identifiers=<value>
                                  Allows duplicated changeset identifiers without
                                  failing Liquibase execution.
                                  default: false

  --always-drop-instead-of-replace=<value>
                                  If true, drop and recreate a view instead of
                                  replacing it.
                                  default: false

  --always-override-stored-logic-schema=<value>
                                  When generating SQL for createProcedure, should
                                  the procedure schema be forced to the default
                                  schema if no schemaName attribute is set?
                                  default: false

  --auto-reorg=<value>            Should Liquibase automatically include REORG TABLE
                                  commands when needed?
                                  default: true

  --changelog-lock-poll-rate=<value>
                                  Number of seconds wait between checks to the
                                  changelog lock when it is locked
                                  default: 10

  --changelog-lock-wait-time-in-minutes=<value>
                                  Number of minutes to wait for the changelog lock
                                  to be available before giving up
                                  default: 5

  --changelog-parse-mode=<value>  Configures how to handle unknown fields in
                                  changelog files. Possible values: STRICT which
                                  causes parsing to fail, and LAX which continues
                                  with the parsing.
                                  default: STRICT

  --classpath=<value>             Additional classpath entries to use

  --convert-data-types=<value>    Should Liquibase convert to/from STANDARD data
                                  types. Applies to both snapshot and update
                                  commands.
                                  default: true

  --database-changelog-lock-table-name=<value>
                                  Name of table to use for tracking concurrent
                                  Liquibase usage
                                  default: DATABASECHANGELOGLOCK

  --database-changelog-table-name=<value>
                                  Name of table to use for tracking change history
                                  default: DATABASECHANGELOG

  --database-class=<value>        Class to use for Database implementation

  --ddl-lock-timeout=<value>      The DDL_LOCK_TIMEOUT parameter indicates the
                                  number of seconds a DDL command should wait for
                                  the locks to become available before throwing
                                  the resource busy error message. This applies
                                  only to Oracle databases.

  --defaults-file=<value>         File with default Liquibase properties
                                  default: liquibase.properties

  --diff-column-order=<value>     Should Liquibase compare column order in diff
                                  operation?
                                  default: true

  --driver=<value>                Database driver class

  --driver-properties-file=<value>
                                  Driver-specific properties

  --duplicate-file-mode=<value>
                                  How to handle multiple files being found in the
                                  search path that have duplicate paths. Options
                                  are WARN (log warning and choose one at random)
                                  or ERROR (fail current operation)
                                  default: ERROR

  --error-on-circular-include-all=<value>
                                  Throw an error if Liquibase detects that an
                                  includeAll will cause a circular reference (and
                                  thus a changelog parse error).
                                  default: true

  --file-encoding=<value>         Encoding to use when reading files. Valid values
                                  include: UTF-8, UTF-16, UTF-16BE, UTF-16LE,
                                  US-ASCII, or OS to use the system configured
                                  encoding.
                                  default: UTF-8

  --generate-changeset-created-values=<value>
                                  Should Liquibase include a 'created' attribute in
                                  diff/generateChangelog changesets with the
                                  current datetime
                                  default: false

  --generated-changeset-ids-contains-description=<value>
                                  Should Liquibase include the change description in
                                  the id when generating changesets?
                                  default: false

  -h, --help                      Show this help message and exit

  --headless=<value>              Force liquibase to think it has no access to a
                                  keyboard
                                  default: false

  --include-catalog-in-specification=<value>
                                  Should Liquibase include the catalog name when
                                  determining equality?
                                  default: false

  --include-relations-for-computed-columns=<value>
                                  If true, the parent relationship for computed
                                  columns is preserved in snapshot-dependent
                                  commands: snapshot and diff
                                  default: false

  --include-system-classpath=<value>
                                  Include the system classpath when resolving
                                  classes at runtime
                                  default: true

  --liquibase-catalog-name=<value>
                                  Catalog to use for Liquibase objects

  --liquibase-schema-name=<value> Schema to use for Liquibase objects

  --liquibase-tablespace-name=<value>
                                  Tablespace to use for Liquibase objects

  --log-channels=<value>          default: Controls which log channels have their
                                  level set by the liquibase.logLevel setting.
                                  Comma separate multiple values. To set the level
                                  of all channels, use 'all'. Example: liquibase,
                                  org.mariadb.jdbc

  --log-file=<value>              Defines a log file

  --log-format=<value>            Sets the format of log output to console or log
                                  files. Open Source users default to unstructured
                                  "TEXT" logs to the console or output log files.
                                  Pro users have the option to set value as "JSON"
                                  or "JSON_PRETTY" to enable json-structured log
                                  files to the console or output log files.
                                  default: TEXT

  --log-level=<value>             default: Controls which logs get set to stderr AND
                                  to any log file. The CLI defaults, if log file
                                  set, to SEVERE. Others vary by integration. The
                                  official log levels are: OFF, SEVERE, WARNING,
                                  INFO, FINE

  --mirror-console-messages-to-log=<value>
                                  When set to true, the console messages are
                                  mirrored to the logs as [liquibase.ui] to
                                  provide a more complete picture of liquibase
                                  operations to log analysis tools. Set to false
                                  to change this behavior.
                                  default: true

  --missing-property-mode=<value> How to handle changelog property expressions where
                                  a value is not set. For example, a string 'null'
                                  when no 'address' property was defined. Values
                                  can be: 'preserve' which leaves the string
                                  as-is, 'empty' which replaces it with an empty
                                  string, or 'error' which stops processing with
                                  an error.
                                  default: PRESERVE

  --monitor-performance=<value>   Enable performance tracking. Set to 'false' to
                                  disable. If set to 'true', data is stored to a
                                  `liquibase-TIMESTAMP.jfr` file in your working
                                  directory. Any other value will enable tracking
                                  and be used as the name of the file to write the
                                  data to.
                                  default: false

  --on-missing-include-changelog=<value>
                                  If set to WARN, then liquibase will not throw
                                  exception on missing changelog file, instead
                                  will show a warning message.
                                  default: FAIL

  --output-file=<value>           Defines an output file

  --output-file-encoding=<value>  Encoding to use when writing files
                                  default: UTF-8

  --output-line-separator=<value> Line separator for output
                                  default: Line separator(LF or CRLF) for output.
                                  Defaults to OS default

  --preserve-schema-case=<value>  Should liquibase treat schema and catalog names as
                                  case sensitive?
                                  default: false

  --prompt-for-non-local-database=<value>
                                  Should Liquibase prompt if a non-local database is
                                  being accessed

  --property-provider-class=<value>
                                  Implementation of Properties class to provide
                                  additional driver properties

  --search-path=<value>           Complete list of Location(s) to search for files
                                  such as changelog files in. Multiple paths can
                                  be specified by separating them with commas.

  --secure-parsing=<value>        If true, remove functionality from file parsers
                                  which could be used insecurely. Examples include
                                  (but not limited to) disabling remote XML entity
                                  support.
                                  default: true

  --should-run=<value>            Should Liquibase commands execute
                                  default: true

  --should-snapshot-data=<value>  Should Liquibase snapshot data by default?
                                  default: false

  --show-banner=<value>           If true, show a Liquibase banner on startup.
                                  default: false

  --sql-log-level=<value>         Level to log SQL statements to
                                  default: FINE

  --sql-show-sql-warnings=<value> Show SQLWarning messages
                                  default: true

  --strict=<value>                Be stricter on allowed Liquibase configuration and
                                  setup?
                                  default: false

  --support-property-escaping=<value>
                                  Support escaping changelog parameters using a
                                  colon. Example: null
                                  default: false

  --ui-service=<value>            Changes the default UI Service Logger used by
                                  Liquibase. Options are CONSOLE or LOGGER.
                                  default: LOGGER

  --use-procedure-schema=<value>  If set to true (default value), createProcedure
                                  tags with a set schemaName will modify the
                                  procedure body with the given schema name.
                                  default: true

  -v, --version                   Print version information and exit

  --validate-xml-changelog-files=<value>
                                  Will perform xsd validation of XML changelog
                                  files. When many XML changelog files are
                                  included this validation may impact Liquibase
                                  performance. Defaults to true.
                                  default: true


Each argument contains the corresponding 'configuration key' in parentheses. As
an alternative to passing values on the command line, these keys can be used as
a basis for configuration settings in other locations.

Available configuration locations, in order of priority:
- Command line arguments (argument name in --help)
  - Java system properties (configuration key listed above)
  - Environment values (env variable listed above)
  - Defaults file (configuration key OR argument name)

Full documentation is available at
https://docs.sonra.io
https://docs.liquibase.com