Skip to content

The code generation initScript property should be able to read from the file system #16825

@lukaseder

Description

@lukaseder

We have a jdbc.initScript property, which can be used to initialise a database prior to code generation:
https://www.jooq.org/doc/latest/manual/code-generation/codegen-system-properties/

This is very useful for quick tests, including MCVEs:

The feature has been introduced with 3.16:

Unfortunately, it can only run inline scripts, not scripts from the file system. Let's support reading scripts from the file system as well.

  • If the script describes a classpath resource, load that resource
  • If the script describes a file that exists, load that file
  • If the script describes a directory that exists, load all files from that directory, ordered alphabetically (out of scope for now)
  • Otherwise, try to execute the content, as before

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions