Skip to content

Commit

Permalink
Merge pull request #67 from smeup/postgres_migration
Browse files Browse the repository at this point in the history
Add support for H2 embedded DBMS (for tests compatible with Postgres)
  • Loading branch information
foresti-smeup committed May 14, 2024
2 parents 92c92cd + a3eb673 commit 0185bf5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@
<artifactId>postgresql</artifactId>
<version>42.7.3</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.2.224</version>
<scope>test</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/net.sf.jt400/jt400 -->
<dependency>
<groupId>net.sf.jt400</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ enum class TestSQLDBType(
password = "root"),
destroyDatabase = { dbaConnection -> dbaConnection.prepareStatement("DROP SCHEMA PUBLIC CASCADE").use { it.execute() } }
),
// Added H2 embedded DB with postgres compability (for tests)
H2SQLDB(ConnectionConfig(
fileName= "*",
url = "jdbc:h2:~/$DATABASE_NAME;MODE=PostgreSQL",
user = "sa",
password = ""),
destroyDatabase = { dbaConnection -> dbaConnection.prepareStatement("DROP SCHEMA PUBLIC CASCADE").use { it.execute() } }
),
DB2_400(ConnectionConfig(
fileName= "*",
driver = "com.ibm.as400.access.AS400JDBCDriver",
Expand Down

0 comments on commit 0185bf5

Please sign in to comment.