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);

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/jooq-user/9c35d75c-aa4a-4814-b7f6-3e6df29a14dfn%40googlegroups.com.

Reply via email to