ChangeTruncateTableWarn
Last updated: July 14, 2025
This check warns a user when a table is being truncated so that they can ensure this change will not lead to unintentional data loss.
Uses
Property | Value |
Liquibase version required | 4.6.0+ |
Scope (--checks-scope) | changelog |
Default status | enabled |
Default severity (exit code) | 0 ("INFO") |
Customizable settings | No (static) |
Use the check to warn when a table is being truncated, which is a significant database change which can destroy your organization’s most essential resource: critical data. Such an unintended change can result in permanent and irrecoverable data loss, production level service outages, and more. This policy check, like other checks, can be configured with a severity level which returns an exit code designed to stop automated jobs, giving your team time to inspect these significant changes.
Note: ChangeTruncateTableWarn
only supports unmodeled changeset types. If you use this Policy Check with modeled changesets (XML, JSON, and YAML changelogs as well as all ChangeTypes except sql and sqlFile), a message will appear stating the changeset was skipped.
Before you begin
Ensure that you have correctly specified your Liquibase Pro license key.
Ensure that the
--checks-scope
parameter includes the scope of this check.
Changelog checks prerequisites
--license-key=<string>
--checks-scope=<string>
Procedure
Enable
This check is enabled by default. To verify that it is currently enabled, run the checks show
command:
liquibase checks show --check-name=<string>
To run the check, use the checks run command.
liquibase checks run --check-name=<string>
Note: For flow files you'll need to run liquibase flow
to apply your changes.