-
Notifications
You must be signed in to change notification settings - Fork 3
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
Reverese Engineer Exasol Primary Key Not Null Constraints #161
Comments
Thank you for reporting this. create or replace table test.test ( Please install this beta: Please also delete the folder .DbSchema from the user home directory. This will drop all cached settings. Our reverse engineer is calling this: Please let me know if this is working fine. |
I've tried it again with the latest beta version (build 250124), but there is no change in the behavior I described initially. I've also deleted the .DbSchema directory, but it didn't change anything. You are right, it's working better with the DDL file, but there is also one bug: when parsing the DDL with a disabled primary key, DbSchema adds a "not null" constraint to the column, which is not correct as described above. |
Hello,
We removed the not null enforce on primary key columns. A beta update will be ready tomorrow morning under:
[1] https://dbschema.com/beta.php
The DDL is generated using:
execute script exa_toolbox.create_table_ddl(...)
Best regards,
Dragos Pruteanu
[1] https://dbschema.com/beta.php
|
When reverse engineering an existing Exasol table, I've experienced different unexpected behavior with regards to primary keys and not null constraints.
Let's have a look at two cases, where in both cases, the primary key is reverse engineered as unique key, although unique keys do not exist in Exasol. This is most likely due to the behavior of the not null constraints I will describe in the following:
First of all let's have a look at the case, when the primary key is enabled:
As already mentioned, the primary key will be reverse engineered as unique key. There is actually no explicit not null constraint defined in the catalog (sys.exa_all_constraints):
But when quering the column informations, we can see, that the column is not nullable:
The following is the output of the reverse engineering logs:
Now, let's have a look at the second case, where the primary key is disabled:
Also here, the primary key will be reverse engineered as unique key. There is actually no explicit not null constraint defined in the catalog (sys.exa_all_constraints):
But when quering the column informations, we can see, that the column is nullable and due to the disable primary key, null values are actually allowed:
The following is the output of the reverse engineering logs:
DbSchema Version: 9.6.5 build 250106
OS: Windows
Database: Exasol
The text was updated successfully, but these errors were encountered: