Fix: DDL will get wrong hint for special migration

This commit is contained in:
Roland Praml committed 2022-07-28 15:10:37 +02:00
1 parent 3c2b5f253f
commit dab428ead5
1 file changed
+3 -2
@@ -108,8 +108,9 @@ public class BaseTableDdl implements TableDdl {
// altered columns will be in the alterTable buffers. // altered columns will be in the alterTable buffers.
// 'after' goes to the post-alter-buffer // 'after' goes to the post-alter-buffer
if (!after.isEmpty()) { if (!after.isEmpty()) {
writer.applyPostAlter().append("-- NOTE: table has @History - special migration may be necessary").newLine(); if (withHistory) {
writer.applyPostAlter().append("-- NOTE: table has @History - special migration may be necessary").newLine();
}
// here we run post migration scripts // here we run post migration scripts
for (String ddlScript : after) { for (String ddlScript : after) {
writer.applyPostAlter().appendStatement(translate(ddlScript, tableName, columnName, defaultValue)); writer.applyPostAlter().appendStatement(translate(ddlScript, tableName, columnName, defaultValue));