Skip to content

Commit

Permalink
Made the JDBC Schema name customizable
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Aug 30, 2020
1 parent 126ebaf commit ee3459d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public final class SMPJDBCConfiguration
public static final String CONFIG_JDBC_URL = "jdbc.url";
public static final String CONFIG_JDBC_USER = "jdbc.user";
public static final String CONFIG_JDBC_PASSWORD = "jdbc.password";
public static final String CONFIG_JDBC_SCHEMA = "jdbc.schema";
public static final String CONFIG_TARGET_DATABASE = "target-database";

@Since ("5.0.6")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void beforeInitManagers ()
.baselineVersion ("1")
.baselineDescription ("SMP 5.2.x database layout, MySQL only")
.locations ("db/migrate-" + m_eDBType.getID ())
.schemas ("smp")
.schemas (aCF.getAsString (SMPJDBCConfiguration.CONFIG_JDBC_SCHEMA, "smp"))
/*
* Avoid scanning the ClassPath by
* enumerating them explicitly
Expand Down
2 changes: 2 additions & 0 deletions phoss-smp-webapp-sql/src/main/resources/smp-server.properties
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,15 @@ jdbc.driver = com.mysql.cj.jdbc.Driver
jdbc.url = jdbc:mysql://localhost:3306/smp?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
jdbc.user = smp
jdbc.password = smp
jdbc.schema = smp
target-database = MySQL

# PostgreSQL example
#jdbc.driver = org.postgresql.Driver
#jdbc.url = jdbc:postgresql://localhost:5432/smp
#jdbc.user = smp
#jdbc.password = smp
#jdbc.schema = smp
#target-database = PostgreSQL

## Warn if JDBC execution time is exceeded? (since 5.0.6)
Expand Down

0 comments on commit ee3459d

Please sign in to comment.