Trying to figure out why `Schema.create` only creates my tables once when running h2 in memory dbs i...
d
Trying to figure out why
Schema.create
only creates my tables once when running h2 in memory dbs in my tests, I need to recreate the connection and tables for each test, but it doesn't do it after the first time... and then all the following tests fail...
r
Mayne use
"jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;"
and make your schema be permanent?
d
It looks like that + using
SchemaUtil.drop
on all the tables helps... but now it seems like just one column is missing... but it's there in the table definition... 🤕
Maybe SchemaUtil ignores the current transactions' db? I have multiple dbs running...
e
did you specify the database for your transaction? so instead of doing
transaction { .. }
you do
transaction(db) { … }
d
Yes...
my bad... typical error of assigning a column to a column instead of the value (with the same name...). It works now...