Run the exclude-objects attribute

To run the --exclude-objects attribute with the diff or generate-changelog command, ensure that you have configured the Liquibase properties file to include the driver, classpath, and URL for the database that you want to capture. Another way is to pass all attributes on the command line.

Procedure

1

Create a new table in your database or use an existing one.

2

Run the following:

  • diff command example: liquibase diff --exclude-objects="my_table" Note: Enter the name of your table in place of my_table. You can also run liquibase diff --exclude-objects="table:mytable".

  • generate-changelog command example: liquibase generate-changelog --exclude-objects="my_table" Note: Enter the name of your table in place of my_table. You must pass --exclude-objects to the right of generate-changelog.

Run the exclude-objects attribute - Liquibase