Skip to content

Commit 8dd61a8

Browse files
committed
Removed logic used to set H2 to PostgreSQL mode in the initSchema() in DbUtils. It is up to the caller to set up the database properties prior to calling this function.
1 parent 85b1a84 commit 8dd61a8

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/javaxt/express/utils/DbUtils.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import java.util.*;
77
import javaxt.sql.*;
88
import javaxt.json.*;
9-
import javaxt.utils.Console;
9+
import static javaxt.utils.Console.console;
1010

1111

1212
//******************************************************************************
@@ -20,8 +20,6 @@
2020

2121
public class DbUtils {
2222

23-
private static Console console = new Console();
24-
2523

2624
//**************************************************************************
2725
//** initSchema
@@ -74,13 +72,6 @@ public static boolean initSchema(Database database, String schema, String tableS
7472
javaxt.io.File db = new javaxt.io.File(database.getHost() + ".mv.db");
7573
if (!db.exists()){
7674

77-
//Set H2 to PostgreSQL mode
78-
java.util.Properties properties = database.getProperties();
79-
if (properties==null) properties = new java.util.Properties();
80-
properties.setProperty("MODE", "PostgreSQL");
81-
properties.setProperty("DATABASE_TO_LOWER", "TRUE");
82-
properties.setProperty("DEFAULT_NULL_ORDERING", "HIGH");
83-
database.setProperties(properties);
8475

8576

8677
ArrayList<String> arr = null;
@@ -216,6 +207,7 @@ else if (driver.equals("PostgreSQL")){
216207
throw e;
217208
}
218209
}
210+
219211
return schemaInitialized;
220212
}
221213

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy