Closed ksperling closed 7 years ago
Ok, the commit above just reads the schema from config and uses that (rather than it always being null). To me that ought to fix this issue (assuming the the config has the correct schema set).
I'll close this for now. Please re-open if this doesn't work for your use case and I'll review it again.
Thanks, Rob.
It seems
MigrationTable.schema
is alwaysnull
, so at least on PG it looks for thedb_migration
table in any schema rather than the current one (which I'm setting via the jdbc url). If the current schema doesn't have the table but another one does it then blows up when trying to use it (as it's in the wrong schema).It seems that absent any particular schema being configured, it should use
connection.getSchema()
to find the schema name.Or maybe the simplest approach would be to just try to blindly load the migrations and handle the 'table not found' error by creating it.