Skip to content

Commit

Permalink
Added validation warning for incrementBy on mysql
Browse files Browse the repository at this point in the history
  • Loading branch information
nvoxland committed Jul 7, 2022
1 parent 9f80bc0 commit ee29021
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -43,6 +43,12 @@ public ValidationErrors validate(CreateTableStatement createTableStatement, Data
ValidationErrors validationErrors = new ValidationErrors();
validationErrors.checkRequiredField("tableName", createTableStatement.getTableName());
validationErrors.checkRequiredField("columns", createTableStatement.getColumns());

if (createTableStatement.getAutoIncrementConstraints() != null) {
for (AutoIncrementConstraint constraint : createTableStatement.getAutoIncrementConstraints()) {
validationErrors.checkDisallowedField("incrementBy", constraint.getIncrementBy(), database, MySQLDatabase.class);
}
}
return validationErrors;
}

Expand Down

0 comments on commit ee29021

Please sign in to comment.