Skip to content

Commit

Permalink
Support afterColum attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Hendrik Seffler committed Sep 8, 2016
1 parent db5ad07 commit a0855e8
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,16 @@ String convertColumnToSql(AddColumnConfig column, Database database) {
if (column.getRemarks() != null) {
comment += " COMMENT '" + column.getRemarks() + "'";
}
String after = "";
if (column.getAfterColumn() != null) {
comment += " AFTER " + database.escapeColumnName(null, null, null, column.getAfterColumn());
}
return "ADD COLUMN " + database.escapeColumnName(null, null, null, column.getName())
+ " " + DataTypeFactory.getInstance().fromDescription(column.getType(), database).toDatabaseDataType(database)
+ nullable
+ defaultValue
+ comment;
+ comment
+ after;
}

@Override
Expand Down

0 comments on commit a0855e8

Please # to comment.