mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-08 16:40:20 +00:00
#557 - DDL - DB Migration refactor - remove drop.ddl and use pendingDrops.
This commit is contained in:
1 parent
1bee6fcae5
commit
6b490ed8b1
7 files changed
+9
-51
No files matched your search
@@ -46,7 +46,7 @@ public class BaseDdlHandlerTest extends BaseTestCase {
|
||||
|
||||
handler.generate(write, Helper.getDropColumn());
|
||||
|
||||
assertThat(write.drop().getBuffer()).isEqualTo("alter table foo drop column col2;\n\n");
|
||||
assertThat(write.apply().getBuffer()).isEqualTo("alter table foo drop column col2;\n\n");
|
||||
assertThat(write.rollback().getBuffer()).isEqualTo("");
|
||||
}
|
||||
|
||||
@@ -77,7 +77,6 @@ public class BaseDdlHandlerTest extends BaseTestCase {
|
||||
String rollbackLast = Helper.asText(this, "/assert/BaseDdlHandlerTest/rollback.sql");
|
||||
|
||||
assertThat(write.apply().getBuffer()).isEqualTo(apply);
|
||||
assertThat(write.drop().getBuffer()).isEqualTo("alter table foo drop column col2;\n\n");
|
||||
assertThat(write.rollback().getBuffer()).isEqualTo(rollbackLast);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,8 +35,6 @@ public class H2HistoryDdlTest {
|
||||
|
||||
assertThat(write.applyHistory().isEmpty()).isFalse();
|
||||
assertThat(write.applyHistory().getBuffer()).contains("add one");
|
||||
assertThat(write.applyHistory().getBuffer()).doesNotContain("two");
|
||||
|
||||
assertThat(write.rollback().isEmpty()).isFalse();
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -64,7 +64,7 @@ public class HistoryTableUpdateTest {
|
||||
upd.add(HistoryTableUpdate.Change.ADD, "two");
|
||||
upd.add(HistoryTableUpdate.Change.DROP, "four");
|
||||
|
||||
assertThat(upd.description()).isEqualTo("add two");
|
||||
assertThat(upd.description()).isEqualTo("[add two, drop four]");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -76,7 +76,7 @@ public class HistoryTableUpdateTest {
|
||||
upd.add(HistoryTableUpdate.Change.EXCLUDE, "six");
|
||||
upd.add(HistoryTableUpdate.Change.DROP, "four");
|
||||
|
||||
assertThat(upd.description()).isEqualTo("add two, include five, exclude six");
|
||||
assertThat(upd.description()).isEqualTo("[add two, include five, exclude six, drop four]");
|
||||
}
|
||||
|
||||
List<String> current() {
|
||||
|
||||
Reference in new issue
Block a user