-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Description
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
Metadata
Metadata
Assignees
Labels
No labels