liquibase/liquibase-data

`diff` and Repository Name

Closed this issue · 2 comments

r2-lf commented

Most commands take --repository but diff requires --repositoryName

mcred commented

The output from diff looks like:

liquibase data diff --help


Usage: liquibase data diff [OPTIONS]

      --diff-types=PARAM     Types of objects to compare
                             (liquibase.command.diffTypes OR liquibase.command.
                               data.diff.diffTypes)
                             (LIQUIBASE_COMMAND_DIFF_TYPES OR
                               LIQUIBASE_COMMAND_DATA_DIFF_DIFF_TYPES)
                             [deprecated: --diffTypes]

      --driver=PARAM         The JDBC driver class
                             (liquibase.command.driver OR liquibase.command.
                               data.diff.driver)
                             (LIQUIBASE_COMMAND_DRIVER OR
                               LIQUIBASE_COMMAND_DATA_DIFF_DRIVER)

      --driver-properties-file=PARAM
                             The JDBC driver properties file
                             (liquibase.command.driverPropertiesFile OR
                               liquibase.command.data.diff.driverPropertiesFile)
                             (LIQUIBASE_COMMAND_DRIVER_PROPERTIES_FILE OR
                               LIQUIBASE_COMMAND_DATA_DIFF_DRIVER_PROPERTIES_FIL
                               E)
                             [deprecated: --driverPropertiesFile]

      --exclude-objects=PARAM
                             Objects to exclude from diff
                             (liquibase.command.excludeObjects OR liquibase.
                               command.data.diff.excludeObjects)
                             (LIQUIBASE_COMMAND_EXCLUDE_OBJECTS OR
                               LIQUIBASE_COMMAND_DATA_DIFF_EXCLUDE_OBJECTS)
                             [deprecated: --excludeObjects]

  -h, --help                 Show this help message and exit
      --include-objects=PARAM
                             Objects to include in diff
                             (liquibase.command.includeObjects OR liquibase.
                               command.data.diff.includeObjects)
                             (LIQUIBASE_COMMAND_INCLUDE_OBJECTS OR
                               LIQUIBASE_COMMAND_DATA_DIFF_INCLUDE_OBJECTS)
                             [deprecated: --includeObjects]

      --password=PARAM       The target database password
                             (liquibase.command.password OR liquibase.command.
                               data.diff.password)
                             (LIQUIBASE_COMMAND_PASSWORD OR
                               LIQUIBASE_COMMAND_DATA_DIFF_PASSWORD)

      --reference-password=PARAM
                             The reference database password
                             (liquibase.command.referencePassword OR liquibase.
                               command.data.diff.referencePassword)
                             (LIQUIBASE_COMMAND_REFERENCE_PASSWORD OR
                               LIQUIBASE_COMMAND_DATA_DIFF_REFERENCE_PASSWORD)
                             [deprecated: --referencePassword]

      --reference-url=PARAM  [REQUIRED] The JDBC reference database connection
                               URL
                             (liquibase.command.referenceUrl OR liquibase.
                               command.data.diff.referenceUrl)
                             (LIQUIBASE_COMMAND_REFERENCE_URL OR
                               LIQUIBASE_COMMAND_DATA_DIFF_REFERENCE_URL)
                             [deprecated: --referenceUrl]

      --reference-username=PARAM
                             The reference database username
                             (liquibase.command.referenceUsername OR liquibase.
                               command.data.diff.referenceUsername)
                             (LIQUIBASE_COMMAND_REFERENCE_USERNAME OR
                               LIQUIBASE_COMMAND_DATA_DIFF_REFERENCE_USERNAME)
                             [deprecated: --referenceUsername]

      --schemas=PARAM        Schemas to include in diff
                             (liquibase.command.schemas OR liquibase.command.
                               data.diff.schemas)
                             (LIQUIBASE_COMMAND_SCHEMAS OR
                               LIQUIBASE_COMMAND_DATA_DIFF_SCHEMAS)

      --source-db=PARAM      Name of Source Database
                             (liquibase.command.sourceDb OR liquibase.command.
                               data.diff.sourceDb)
                             (LIQUIBASE_COMMAND_SOURCE_DB OR
                               LIQUIBASE_COMMAND_DATA_DIFF_SOURCE_DB)
                             [deprecated: --sourceDb]

      --source-state=PARAM   Commit for Source Database, defaults to current
                               (optional)
                             (liquibase.command.sourceState OR liquibase.
                               command.data.diff.sourceState)
                             (LIQUIBASE_COMMAND_SOURCE_STATE OR
                               LIQUIBASE_COMMAND_DATA_DIFF_SOURCE_STATE)
                             [deprecated: --sourceState]

      --target-state=PARAM   Commit for Target Database, defaults to current
                               (optional)
                             (liquibase.command.targetState OR liquibase.
                               command.data.diff.targetState)
                             (LIQUIBASE_COMMAND_TARGET_STATE OR
                               LIQUIBASE_COMMAND_DATA_DIFF_TARGET_STATE)
                             [deprecated: --targetState]

      --url=PARAM            [REQUIRED] The JDBC target database connection URL
                             (liquibase.command.url OR liquibase.command.data.
                               diff.url)
                             (LIQUIBASE_COMMAND_URL OR
                               LIQUIBASE_COMMAND_DATA_DIFF_URL)

      --username=PARAM       The target database username
                             (liquibase.command.username OR liquibase.command.
                               data.diff.username)
                             (LIQUIBASE_COMMAND_USERNAME OR
                               LIQUIBASE_COMMAND_DATA_DIFF_USERNAME)


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
http://www.liquibase.org

Where do you find --repositoryName?

r2-lf commented

C:\dev\liquibase\liquibase-4.4.3>liquibase data diff --reference-url=jdbc:postgresql://localhost:5432/postgres
####################################################
##   _     _             _ _                      ##
##  | |   (_)           (_) |                     ##
##  | |    _  __ _ _   _ _| |__   __ _ ___  ___   ##
##  | |   | |/ _` | | | | | '_ \ / _` / __|/ _ \  ##
##  | |___| | (_| | |_| | | |_) | (_| \__ \  __/  ##
##  \_____/_|\__, |\__,_|_|_.__/ \__,_|___/\___|  ##
##              | |                               ##
##              |_|                               ##
##                                                ##
##  Get documentation at docs.liquibase.com       ##
##  Get certified courses at learn.liquibase.com  ##
##  Free schema change activity reports at        ##
##      https://hub.liquibase.com                 ##
##                                                ##
####################################################
Starting Liquibase at 08:59:28 (version 4.4.3 #53 built at 2021-08-05 18:32+0000)
Liquibase Version: 4.4.3
Liquibase Community 4.4.3 by Datical
Unexpected error running Liquibase: io.titandata.client.ApiException: Missing the required parameter 'repositoryName' when calling getRepository(Async)

For more information, please use the --log-level flag

C:\dev\liquibase\liquibase-4.4.3>liquibase data diff --repositoryName=myrepos --reference-url=jdbc:postgresql://localhost:5432/postgres
Unexpected argument(s): --repositoryName=myrepos

For detailed help, try 'liquibase --help' or 'liquibase <command-name> --help'

Possible solutions: --reference-password, --reference-url, --reference-username