We use H2 as a test database for the junittest suite. The actual application has tables in several databases, such as db1.s1.table1 and db2.s1.table2 (in other words database.schema.tablename). To reproduce this functionality, we need to create two databases db1 and db2, and then create the schema and tables, respectively. We also have dbscript.sql that loads all the data before running the test suite.
Please let us know if there is a way to create multiple databases in H2. If so, which team should do this as part of the script.
Since H2 creates the database specified as part of the jdbc url. Is there a way to specify multiple databases as part of the URL so that we can create them.
source
share