Skip to content

[BUG] Postgress Import from SQL not reflecting ENUM #546

@oktep

Description

@oktep

Here's a polished and clear version of your GitHub issue report:


🐞 Bug: ENUM type not created during "File -> Import from SQL"

When using the "File -> Import from SQL" feature, tables and their data types are imported correctly. However, ENUM types are not created as expected.

This issue occurs in both of the following cases:

  • Direct SQL import with custom ENUMs.
  • Exporting SQL from the app (which includes ENUM types), and then re-importing the same SQL back into the app — the ENUMs are missing after import.

Example SQL:

CREATE TYPE "ENUM_FOO" AS ENUM (
  'A',
  'B',
  'C'
);

CREATE TABLE "balance_change" (
  "id" UUID NOT NULL UNIQUE DEFAULT uuid_generate_v4(),
  "foo_value" ENUM_FOO NOT NULL,
  PRIMARY KEY("id")
);

After importing the SQL:

  • ✅ The table TABLE_ZOO is created correctly.
  • ❌ The ENUM type ENUM_FOO is not shown or listed in the ENUM tab in the top menu.
  • ❌ No ENUM definitions are visible in the schema UI.

Expected Behavior

I expect the ENUM_FOO type to be created and appear under the ENUM section in the top menu, just like other supported types.

Let me know if you need any additional context or the full SQL script to reproduce.


Let me know if you’re submitting this to a specific tool/project (like drawdb.app or Supabase), and I can tailor it further.

Image Image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions