liquibase.precondition.core.TableIsEmptyPrecondition Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of liquibase-core Show documentation
Show all versions of liquibase-core Show documentation
Liquibase is a tool for managing and executing database changes.
package liquibase.precondition.core;
public class TableIsEmptyPrecondition extends RowCountPrecondition {
public TableIsEmptyPrecondition() {
this.setExpectedRows(0);
}
@Override
protected String getFailureMessage(int result, int expectedRows) {
return "Table "+getTableName()+" is not empty. Contains "+result+" rows";
}
@Override
public String getName() {
return "tableIsEmpty";
}
}