From 86476b44943536a91e2a994bc1c4d5df55447b3b Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Fri, 18 Feb 2011 18:25:34 +0000 Subject: [PATCH] Now that we accept a list of SQL statements to be executed individually (and committed after each statement), I no longer need to manually handle table population. --- src/test/java/com/samskivert/depot/MigrationTest.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/test/java/com/samskivert/depot/MigrationTest.java b/src/test/java/com/samskivert/depot/MigrationTest.java index 53bc63f..0a99093 100644 --- a/src/test/java/com/samskivert/depot/MigrationTest.java +++ b/src/test/java/com/samskivert/depot/MigrationTest.java @@ -47,7 +47,6 @@ public class MigrationTest extends TestBase public void testPKMigration () { PersistenceContext pctx = createPersistenceContext("pkmig", PK_DUMP); - executeSQL(pctx, PK_INIT); // now that the schema is created, we can populate DepotRepository repo = createRepository(pctx, PKMigrationRecord.class); // trigger the execution of the migrations pctx.initializeRepositories(true); @@ -101,13 +100,12 @@ public class MigrationTest extends TestBase "\"stringId\" VARCHAR(255) NOT NULL," + "PRIMARY KEY(\"id\",\"stringId\"))", - "INSERT INTO \"DepotSchemaVersion\" VALUES('MigrationTest$PKMigrationRecord',1,0)" - }; + "INSERT INTO \"DepotSchemaVersion\" VALUES('MigrationTest$PKMigrationRecord',1,0)", - protected static final String PK_INIT = "INSERT INTO \"MigrationTest$PKMigrationRecord\" VALUES(1,'1')\n" + "INSERT INTO \"MigrationTest$PKMigrationRecord\" VALUES(2,'2')\n" + "INSERT INTO \"MigrationTest$PKMigrationRecord\" VALUES(3,'3')\n" + "INSERT INTO \"MigrationTest$PKMigrationRecord\" VALUES(4,'4')\n" + - "INSERT INTO \"MigrationTest$PKMigrationRecord\" VALUES(5,'5')\n"; + "INSERT INTO \"MigrationTest$PKMigrationRecord\" VALUES(5,'5')\n" + }; }