use of liquibase.exception.ValidationErrors in project liquibase by liquibase.
the class TableRowCountGenerator method validate.
@Override
public ValidationErrors validate(TableRowCountStatement dropColumnStatement, Database database, SqlGeneratorChain sqlGeneratorChain) {
ValidationErrors validationErrors = new ValidationErrors();
validationErrors.checkRequiredField("tableName", dropColumnStatement.getTableName());
return validationErrors;
}
use of liquibase.exception.ValidationErrors in project liquibase by liquibase.
the class TagDatabaseGenerator method validate.
@Override
public ValidationErrors validate(TagDatabaseStatement tagDatabaseStatement, Database database, SqlGeneratorChain sqlGeneratorChain) {
ValidationErrors validationErrors = new ValidationErrors();
validationErrors.checkRequiredField("tag", tagDatabaseStatement.getTag());
return validationErrors;
}
use of liquibase.exception.ValidationErrors in project liquibase by liquibase.
the class UpdateGenerator method validate.
@Override
public ValidationErrors validate(UpdateStatement updateStatement, Database database, SqlGeneratorChain sqlGeneratorChain) {
ValidationErrors validationErrors = new ValidationErrors();
validationErrors.checkRequiredField("tableName", updateStatement.getTableName());
validationErrors.checkRequiredField("columns", updateStatement.getNewColumnValues());
if (updateStatement.getWhereParameters() != null && updateStatement.getWhereParameters().size() > 0 && updateStatement.getWhereClause() == null) {
validationErrors.addError("whereParams set but no whereClause");
}
return validationErrors;
}
use of liquibase.exception.ValidationErrors in project liquibase by liquibase.
the class ReindexGeneratorSQLite method validate.
@Override
public ValidationErrors validate(ReindexStatement reindexStatement, Database database, SqlGeneratorChain sqlGeneratorChain) {
ValidationErrors validationErrors = new ValidationErrors();
validationErrors.checkRequiredField("tableName", reindexStatement.getTableName());
return validationErrors;
}
use of liquibase.exception.ValidationErrors in project liquibase by liquibase.
the class RenameColumnGenerator method validate.
@Override
public ValidationErrors validate(RenameColumnStatement renameColumnStatement, Database database, SqlGeneratorChain sqlGeneratorChain) {
ValidationErrors validationErrors = new ValidationErrors();
validationErrors.checkRequiredField("tableName", renameColumnStatement.getTableName());
validationErrors.checkRequiredField("oldColumnName", renameColumnStatement.getOldColumnName());
validationErrors.checkRequiredField("newColumnName", renameColumnStatement.getNewColumnName());
if (database instanceof MySQLDatabase) {
validationErrors.checkRequiredField("columnDataType", StringUtils.trimToNull(renameColumnStatement.getColumnDataType()));
}
return validationErrors;
}
Aggregations