I have seen flyaway but it doesn't really have a model of what it's executing. It just executes scripts (or jdbc based code) without actually knowing what's happening.
What I really want to do is 1. Use jOOQ-meta to export my production schema to a file (schema.xml?) 2. Read the schema.xml during tests and use jOOQ to create tables in a h2 database 3. Use jOOQ to insert some test data into the h2 db If you're interested... this is what I'm making https://github.com/uklance/grater Sample usage (this test fails since it's not implemented yet!) https://github.com/uklance/grater/blob/master/grater-test/src/test/java/org/grater/test/GraterBuilderIntegrationTest.java On Tuesday, 20 August 2013 08:54:04 UTC+1, Lukas Eder wrote: > > > > > 2013/8/19 <[email protected] <javascript:>> > >> Thanks, I'll keep an eye on the issue >> >> FYI, my use case only requires create table and it would only be used in >> test cases, not actual production code. >> I'd basically be creating a schema in an in memory H2 database prior to >> running some tests. >> >> I'm assuming Hibernate's support for "hbm2ddl.auto" has solved the >> problem and could be used as a reference. >> > > Hibernate tends to drive the SQL interaction that it generates. For jOOQ, > DDL is a different beast, as jOOQ's mission is to be SQL-centric / > database-first. While simple DDL can be generated from table metadata, more > complex DDL usually cannot. By more complex, I actually mean simple things > as vendor-specific storage clauses, function-based indexes, etc. > > Now, I understand that some use-cases around integration testing could > already be covered. But by adding DDL support, jOOQ would generally raise > expectations for more sophisticated DDL. > > Have you tried using Flyway for the task? http://flywaydb.org > > Cheers > Lukas > -- 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]. For more options, visit https://groups.google.com/groups/opt_out.
