Open amokmen opened 2 years ago
Thanks for letting us know - we'll look into this and hopefully have fixes by the next update!
same problem as OP. Ubuntu 22.04 using oracle SQL, no diagrams at all, figured out it was because CHECK and CONSTRAINT after removing them it would generate normal table. Also generates inline comments as attributes of table
Oracle SQL
CREATE TABLE CUSTOMER_ORDER (
ORDER_ID INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
DATE_ORDER TIMESTAMP NOT NULL,
DATE_DEADLINE DATE NOT NULL,
PRICE NUMBER(10,2) DEFAULT NULL,
PAID NUMBER(1), -- 0 not paid, 1 paid
CUSTOMER_FK INT NOT NULL,
ADDRESS VARCHAR(255),
CHECK(PAID IN (0,1)),
CONSTRAINT CUSTOMER_CONSTRAINT FOREIGN KEY (CUSTOMER_FK) REFERENCES CUSTOMER (CUSTOMER_ID)
ON DELETE SET NULL,
);
attach picture shows after removed CONSTRAINT and CHECK
Win10: VSCode 1.61.0, WSL Ubuntu
SQLite:
Problem is in 'AUTOINCREMENT' probably. Or in 'TEXT'. Or in foreign key.