use of liquibase.exception.ValidationErrors in project liquibase by liquibase.
the class SetNullableGenerator method validate.
@Override
public ValidationErrors validate(SetNullableStatement setNullableStatement, Database database, SqlGeneratorChain sqlGeneratorChain) {
ValidationErrors validationErrors = new ValidationErrors();
validationErrors.checkRequiredField("tableName", setNullableStatement.getTableName());
validationErrors.checkRequiredField("columnName", setNullableStatement.getColumnName());
if (database instanceof MSSQLDatabase || database instanceof MySQLDatabase || database instanceof InformixDatabase || database instanceof H2Database) {
validationErrors.checkRequiredField("columnDataType", setNullableStatement.getColumnDataType());
}
try {
if ((database instanceof DB2Database) && (database.getDatabaseMajorVersion() > 0 && database.getDatabaseMajorVersion() < 9)) {
validationErrors.addError("DB2 versions less than 9 do not support modifying null constraints");
}
} catch (DatabaseException ignore) {
//cannot check
}
return validationErrors;
}
use of liquibase.exception.ValidationErrors in project liquibase by liquibase.
the class StoredProcedureGenerator method validate.
@Override
public ValidationErrors validate(StoredProcedureStatement storedProcedureStatement, Database database, SqlGeneratorChain sqlGeneratorChain) {
ValidationErrors validationErrors = new ValidationErrors();
validationErrors.checkRequiredField("procedureName", storedProcedureStatement.getProcedureName());
return validationErrors;
}
use of liquibase.exception.ValidationErrors in project liquibase by liquibase.
the class UpdateChangeSetChecksumGenerator method validate.
@Override
public ValidationErrors validate(UpdateChangeSetChecksumStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain) {
ValidationErrors validationErrors = new ValidationErrors();
validationErrors.checkRequiredField("changeSet", statement.getChangeSet());
return validationErrors;
}
use of liquibase.exception.ValidationErrors in project liquibase by liquibase.
the class RemoveChangeSetRanStatusGenerator method validate.
@Override
public ValidationErrors validate(RemoveChangeSetRanStatusStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain) {
ValidationErrors errors = new ValidationErrors();
errors.checkRequiredField("changeSet", statement.getChangeSet());
return errors;
}
use of liquibase.exception.ValidationErrors in project liquibase by liquibase.
the class RenameSequenceGenerator method validate.
@Override
public ValidationErrors validate(RenameSequenceStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain) {
ValidationErrors validationErrors = new ValidationErrors();
validationErrors.checkRequiredField("newSequenceName", statement.getNewSequenceName());
validationErrors.checkRequiredField("oldSequenceName", statement.getOldSequenceName());
return validationErrors;
}
Aggregations