New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DDLDatabase throws parse error 'DEFAULT custom_function_name()' #10107
Comments
Thanks a lot for your report. This should definitely work. We'll look into it. There are several steps here:
You could also add those comments inside of the CREATE TABLE tbl (
pkey UUID NOT NULL /* [jooq ignore start] */DEFAULT uuid_generate_v1() /* [jooq ignore stop] */,
...
) You don't have to do this manually. You could write a preprocessor that processes your SQL script with some regular expression search/replace prior to passing the script to jOOQ. |
Looking into this now. There's no way to keep the function name around with our current infrastructure:
Assuming:
I'd say that simply replacing the |
Fixed in jOOQ 3.19.0. I don't want to backport this, because I fear it could introduce very subtle regressions in client code that worked around this issue thus far. Given there has always been an acceptable workaround, I don't think a backport is of the essence. |
Expected behavior and actual behavior:
referencing the OSSP uuid functions as the default value on columns in ddl and jooq DDLDatabase codegen fails on that syntax:
Steps to reproduce the problem (if possible, create an MCVE: https://github.com/jOOQ/jOOQ-mcve):
is there any workaround for this, other than doing alter statements wrapped with [jooq ignores] on each column after the create?
Versions:
The text was updated successfully, but these errors were encountered: