diff --git a/src/main/java/io/ebean/dbmigration/ddlgeneration/platform/SqlServerHistoryDdl.java b/src/main/java/io/ebean/dbmigration/ddlgeneration/platform/SqlServerHistoryDdl.java index 023dcdc7d..fd4232678 100644 --- a/src/main/java/io/ebean/dbmigration/ddlgeneration/platform/SqlServerHistoryDdl.java +++ b/src/main/java/io/ebean/dbmigration/ddlgeneration/platform/SqlServerHistoryDdl.java @@ -33,7 +33,7 @@ public class SqlServerHistoryDdl implements PlatformHistoryDdl { DdlBuffer apply = writer.applyHistory(); apply.append("alter table ").append(baseTable).newLine() .append(" add ").append(systemPeriodStart).append(" datetime2 GENERATED ALWAYS AS ROW START NOT NULL DEFAULT SYSUTCDATETIME(),").newLine() - .append(" ").append(systemPeriodEnd).append(" datetime2 GENERATED ALWAYS AS ROW END NOT NULL,").newLine() + .append(" ").append(systemPeriodEnd).append(" datetime2 GENERATED ALWAYS AS ROW END NOT NULL DEFAULT '9999-12-31T23:59:59.9999999',").newLine() .append("period for system_time (").append(systemPeriodStart).append(", ").append(systemPeriodEnd).append(")").endOfStatement(); String historyTable = baseTable + "_history"; // history must contain schema, otherwise you'll get