- Reference
- Version ยท 6.0
- Change Automation Reference
--exclude-objects
Last updated: September 29, 2026
Objects to exclude from diff.
Excluded columns and dependent objects
When you exclude a column, Liquibase does not also exclude the objects that depend on it. A foreign key, unique constraint, primary key, or index that uses the column stays in the output of diff, diff-changelog, and generate-changelog. A changelog generated this way can fail to deploy, because those objects reference a column the changelog never creates.
Liquibase warns you when this happens. The warning is a count of the affected objects, not a list:
WARNING: 4 object(s) depend on a column excluded by --excludeObjects/--includeObjects. The diff or generated changelog may reference an object that does not exist and could fail to deploy. See the log for details.
The warning does not change the output. The command still completes, and diff-changelog and generate-changelog still write the changelog with those objects in it. Review the changelog and remove or correct the dependent objects before you deploy it.
To see which objects are affected, set --log-level to WARNING or a more verbose level. Each object is logged on its own line, naming the object and the column it depends on:
liquibase diff-changelog --exclude-objects="column:extra_col" --log-level=WARNING --log-file=liquibase.log
Note: Liquibase detects foreign keys, unique constraints, primary keys, and indexes, because it knows which columns they use. It does not detect a view, function, stored procedure, or trigger whose SQL references the column, so these objects get no warning. A function or procedure like this can deploy without an error and fail only when it runs, so check them yourself.
Syntax
You can set this parameter in the following ways:
Option | Syntax |
Command CLI parameter |
|
Liquibase properties file (defaults file) |
|
Command flow file argument (example) |
|
JVM system property (JAVA_OPTS environment variable) |
|
Liquibase environment variable |
|