drawdb-io / drawdb

Free, simple, and intuitive online database diagram editor and SQL generator.
https://drawdb.app
GNU Affero General Public License v3.0
22.7k stars 1.58k forks source link

[BUG] error importing postgresql sql script #291

Open carlosmascarenhas opened 2 weeks ago

carlosmascarenhas commented 2 weeks ago

Describe the bug When I try to import an SQL script generated by drawDB itself that has an auto-increment field, the following error is returned: image

Apparently it has to do with the PR #255

To Reproduce try to import this sql script that was generated by drawDB itself:

CREATE TABLE "test" (
    "id" INTEGER NOT NULL UNIQUE GENERATED BY DEFAULT AS IDENTITY,
    PRIMARY KEY("id")
);
1ilit commented 2 weeks ago

255 deals with exports. The parser fails on 'generated'. I'll report it if I haven't already