简体   繁体   中英

Create Table from generated classes

I have generated the representations for my database-model in jooq. Can I use this to recreate the Database?.

createTable(org.jooq.Table<?> table) wants me to specify the columns.

Ideally when the schema changes, i would just update the jooq representation and when another user installs it it would automatically create the right schema.

There is a pending feature request for this kind of functionality: https://github.com/jOOQ/jOOQ/issues/3160

But as of jOOQ 3.7, this isn't yet possible. The main challenge is the fact that the generated schema meta information will always lack important pieces (eg vendor-specific storage clauses), so this kind of functionality is good for simple databases or test databases at best.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM