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] Enums are created but are not applied in the table columns, when importing from a SQL file #259

Open bozoh opened 1 month ago

bozoh commented 1 month ago

Describe the bug

When importing a PostgreSQL SQL file with enums, these enums are created but are not applied in the table columns. Instead, a blob is set.

To Reproduce

With this SQL script:

CREATE TYPE "Gender" AS ENUM (
  'M',
  'F'
);
CREATE TABLE "people" (
  "id" integer PRIMARY KEY,
  "gender" Gender
) 

Expected behavior

The column "gender" type should be "Gender" (enum) and not a blob.

Screenshots

image

Desktop (please complete the following information):

Additional context

test.sql.txt

bozoh commented 1 month ago

i think it's the same issue of #196