Hello!
I'm trying to create "migrations"(there's no much documentation atm) from an existent DB into a testcontainer one in another dialect without success, @Lukas it's maybe not an intended use case, but would be an interesting one.
don't know if I'm doing something wrong but I would appreciate any help!
What I'm doing is:
- starting a test with spring (@JooqTest) + @Testcontainers
- jooq (for now) is using a real oracle database so let's call it "DSL"
- I'm creating a postgres container with testcontainers and creating a DSLContext
with the jdbc url etc, let's call it postgresDsl
so when the start up is ready I'm running:
final Meta oracleMeta = dsl.meta(DefaultSchema.DEFAULT_SCHEMA);
final DDLExportConfiguration configuration = new DDLExportConfiguration();
final Queries ddl = oracleMeta.ddl(configuration);
postgresDsl.meta().apply(ddl);
the apply method files miserably ( same thing when trying:
postgresDsl.meta().migrateTo(oracleMeta);
some errors:
org.jooq.impl.DDL : Cannot parse view source (to skip parsing, use Settings.parseMetaViewSources): CREATE VIEW "pg_timezone_abbrevs" AS SELECT abbrev,
utc_offset,
is_dst
FROM pg_timezone_abbrevs() pg_timezone_abbrevs(abbrev, utc_offset, is_dst);
org.jooq.impl.ParserException: Keyword 'SELECT' expected: [4:29] ...tc_offset,
is_dst
FROM pg_timezone_abbrevs([*]) pg_timezone_abbrevs(abbrev, utc_offset, is_dst);