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

Parser skips tables containing 'REFERENCES' and 'NOT NULL' #239

Closed
Nerwerder opened this issue Feb 25, 2024 · 2 comments
Closed

Parser skips tables containing 'REFERENCES' and 'NOT NULL' #239

Nerwerder opened this issue Feb 25, 2024 · 2 comments
Assignees

Comments

@Nerwerder
Copy link

Nerwerder commented Feb 25, 2024

Describe the bug

Calling 'parse_from_file' on a file containing (postgres) sql 'create table' instructions will not return tables containing a column using 'REFERENCES' and 'NOT NULL'.

To Reproduce

Good case:

CREATE TABLE a
(
    id UUID PRIMARY KEY
);

CREATE TABLE b
(
    id UUID PRIMARY KEY,
    a_id UUID REFERENCES a(id)
);

=> Will return two tables.

Bad case:

CREATE TABLE a
(
    id UUID PRIMARY KEY
);

CREATE TABLE b
(
    id UUID PRIMARY KEY,
    a_id UUID REFERENCES a(id) NOT NULL
);

=> Will only return a single table (a).

Expected behavior

All tables should be returned.

Environment:

  • Ubuntu 23.10
  • Python 3.12.0
  • simple-ddl-parser 1.0.3
@xnuinside xnuinside self-assigned this Mar 25, 2024
@xnuinside
Copy link
Owner

fixed in version 1.0.4 #244

@Nerwerder, thanks for opening the issue!

@xnuinside
Copy link
Owner

version 1.0.4 was released, issue was fixed, if needed anything else - feel free to open a new issue

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

2 participants