Skip to content

Commit 5f43e18

Browse files
committed
fixed wrong loading of SQL script
1 parent c19386f commit 5f43e18

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

jdk_11_maven/em/external/rest/ind1/src/main/java/em/external/org/ind1/ExternalEvoMasterController.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ public ExternalEvoMasterController(
113113
setControllerPort(controllerPort);
114114
setJavaCommand(command);
115115

116-
try (InputStream in = getClass().getResourceAsStream(INIT_DB_SCRIPT_PATH)) {
117-
initSQLScript = String.join(System.lineSeparator(), (new SqlScriptRunner()).readCommands(new InputStreamReader(in)));
118-
} catch (Exception e) {
119-
throw new RuntimeException(e);
120-
}
116+
// try (InputStream in = getClass().getResourceAsStream(INIT_DB_SCRIPT_PATH)) {
117+
// initSQLScript = String.join(System.lineSeparator(), (new SqlScriptRunner()).readCommands(new InputStreamReader(in)));
118+
// } catch (Exception e) {
119+
// throw new RuntimeException(e);
120+
// }
121121
}
122122

123123

@@ -196,7 +196,7 @@ public void postStart() {
196196
Arrays.asList("flyway_schema_history"));
197197

198198
dbSpecification = Arrays.asList(new DbSpecification(DatabaseType.POSTGRES,sqlConnection)
199-
.withSchemas("subscriptions").withInitSqlScript(initSQLScript));
199+
.withSchemas("subscriptions").withInitSqlOnResourcePath(INIT_DB_SCRIPT_PATH));
200200
} catch (Exception e) {
201201
throw new RuntimeException(e);
202202
}

0 commit comments

Comments
 (0)