Indeed, there's a lot in this area that is still in development. However, from how you described your use-cases to Rob, I think you can already use what's there for many of your purposes. The question is: How do you want to describe your dynamic metadata?
jOOQ can create org.jooq.Meta types from various information sources:
- Generated code (which you don't have). Relevant methods are DSLContext.meta(Catalog...), meta(Schema...), meta(Table...)
- JDBC DatabaseMetaData. The relevant method is DSLContext.meta(DatabaseMetaData), or just DSLContext.meta() (if you don't change the Configuration.metaProvider())
- XML or the InformationSchema classes (both are the same, via JAXB). The relevant method is DSLContext.meta(InformationSchema)
- DDL in string form, file form, or jOOQ DSL form. The relevant methods are DSLContext.meta(String...), meta(Source...), meta(Query...)
The Meta.diff() method can then produce DDL for any pair of meta types.
Among all the input formats, perhaps the XML format (or its equivalent Java version, the InformationSchema) might be the most manageable. You could maintain an InformationSchema (which you can also extract from other Meta sources, e.g. via Meta::informationSchema), manipulate it, e.g. by adding columns to it, and then generate a diff.
The devil is in the details. For example, the XML format might not be able to handle some vendor specific data types, such as arrays, nor do we support altering all vendor specific data types, should you need that. But I think this approach could already get you quite far with jOOQ 3.13 and soon 3.14. We're always open to feature requests in this area, as this will be of high strategic value to us in the near future.
Thanks,
Lukas