Skip to content
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

Unique constraint name unexpectedly leaves out table prefix if used #63

Closed
stevemuench opened this issue Mar 31, 2024 · 0 comments
Closed

Comments

@stevemuench
Copy link

If you explicitly name your table with a prefix, its name is used correctly in constraint names. For example:

e01_t
   s vc20 /nn /unique

This produces the expected result of:

create table e01_t (
    id    number generated by default on null as identity
          constraint e01_t_id_pk primary key,
    s     varchar2(20 char)
          constraint e01_t_s_unq unique not null
);

However, if you use the #prefix setting to add the prefix, then primary key constraint correctly includes the e01 table prefix, but the unique constraint prefix does not.

t
   s vc20 /nn /unique
#prefix: e01

This produces the unexpected result (missing the e01_ prefix in the unique constraint name:

create table e01_t (
    id    number generated by default on null as identity
          constraint e01_t_id_pk primary key,
    s     varchar2(20 char)
          constraint t_s_unq unique not null
);
vadim-tropashko added a commit that referenced this issue Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant