#1045 - MySql - DbMigration generate wrong comment syntax - should be alter table comment = syntax

This commit is contained in:
rob bygrave
2017-06-24 11:23:21 +12:00
parent 4b2481d3ea
commit cebd3f92a4
2 changed files with 25 additions and 0 deletions
@@ -101,4 +101,11 @@ public class MySqlDdl extends PlatformDdl {
apply.append(" comment='").append(tableComment).append("'");
}
/**
* Add table comment as a separate statement (from the create table statement).
*/
@Override
public void addTableComment(DdlBuffer apply, String tableName, String tableComment) throws IOException {
apply.append(String.format("alter table %s comment = '%s'", tableName, tableComment)).endOfStatement();
}
}