mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Fix dbmigration (#1277)
ENH: Support adding a '-- Generated by' comment to DDL including version and timestamp
This commit is contained in:
committed by
Rob Bygrave
parent
0e219a9bc6
commit
91cb5a23fd
+2
-2
@@ -63,7 +63,7 @@ public class ModelBuild_compoundKeyTest extends BaseTestCase {
|
||||
String apply = Helper.asText(this, "/assert/ModelBuild_compoundKeyTest/apply.sql");
|
||||
|
||||
String createDdl = currentModel.getCreateDdl();
|
||||
assertThat(createDdl).isEqualTo(apply);
|
||||
assertThat(createDdl).startsWith("-- Generated by ebean").endsWith(apply);
|
||||
|
||||
}
|
||||
|
||||
@@ -81,6 +81,6 @@ public class ModelBuild_compoundKeyTest extends BaseTestCase {
|
||||
String createDdl = currentModel.getCreateDdl();
|
||||
String apply = Helper.asText(this, "/assert/ModelBuild_compoundKeyTest/apply.sql");
|
||||
|
||||
assertThat(createDdl).isEqualTo(apply);
|
||||
assertThat(createDdl).startsWith("-- Generated by ebean").endsWith(apply);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-2
@@ -45,7 +45,9 @@ public class ModelBuild_explicitSequencesTest extends BaseTestCase {
|
||||
CurrentModel currentModel = new CurrentModel(ebeanServer);
|
||||
|
||||
String apply = currentModel.getCreateDdl();
|
||||
assertThat(apply).isEqualTo(Helper.asText(this, "/assert/ModelBuild_explicitSequencesTest/apply.sql"));
|
||||
assertThat(apply)
|
||||
.startsWith("-- Generated by ebean")
|
||||
.endsWith(Helper.asText(this, "/assert/ModelBuild_explicitSequencesTest/apply.sql"));
|
||||
|
||||
}
|
||||
|
||||
@@ -56,7 +58,9 @@ public class ModelBuild_explicitSequencesTest extends BaseTestCase {
|
||||
CurrentModel currentModel = new CurrentModel(ebeanServer);
|
||||
|
||||
String apply = currentModel.getCreateDdl();
|
||||
assertThat(apply).isEqualTo(Helper.asText(this, "/assert/ModelBuild_explicitSequencesTest/pg-apply.sql"));
|
||||
assertThat(apply)
|
||||
.startsWith("-- Generated by ebean")
|
||||
.endsWith(Helper.asText(this, "/assert/ModelBuild_explicitSequencesTest/pg-apply.sql"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user