#522 - DDL - DB migration diff does not include DDL to add comment

This commit is contained in:
Robin Bygrave
2016-05-12 16:52:22 +12:00
parent 45453bbcd8
commit b8ecbd507e
13 changed files with 223 additions and 3 deletions
@@ -2,6 +2,7 @@ package com.avaje.ebean.dbmigration.model;
import com.avaje.ebean.dbmigration.migration.AddColumn;
import com.avaje.ebean.dbmigration.migration.AddHistoryTable;
import com.avaje.ebean.dbmigration.migration.AddTableComment;
import com.avaje.ebean.dbmigration.migration.AlterColumn;
import com.avaje.ebean.dbmigration.migration.Column;
import com.avaje.ebean.dbmigration.migration.CreateTable;
@@ -285,6 +286,13 @@ public class MTable {
if (addColumn != null) {
modelDiff.addAddColumn(addColumn);
}
if (MColumn.different(comment, newTable.comment)) {
AddTableComment addTableComment = new AddTableComment();
addTableComment.setName(name);
addTableComment.setComment(newTable.comment);
modelDiff.addTableComment(addTableComment);
}
}
/**