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] Import failed with quoted constraint name #230

Open Igorgro opened 2 months ago

Igorgro commented 2 months ago

Describe the bug When SQL code contains quoted constraint name, it is failed to import

To Reproduce Steps to reproduce the behavior:

  1. Try to import the following code:
    CREATE TABLE books (
        id UUID NOT NULL,
        CONSTRAINT "PK_books" PRIMARY KEY (id)
    );
  2. See error (on attached screenshot)
  3. The following code does not produce error:
    CREATE TABLE books (
        id UUID NOT NULL,
        CONSTRAINT PK_books PRIMARY KEY (id)
    );

Expected behavior SQL script successfully imported

Screenshots image

1ilit commented 2 months ago

Yep, this was reported and fixed. In the next release of the parser this will not be a problem