Closed jcoulaud closed 1 month ago
@jcoulaud Hey! It seems that the database already had a type with this name and only 3 values ​​and it did not return an error about a duplicate. You can check this by running this query:
SELECT
n.nspname as enum_schema,
t.typname as enum_name,
e.enumlabel as enum_value
FROM pg_type t
JOIN pg_enum e ON t.oid = e.enumtypid
JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace;
If so, delete the type and run the migration again.
@jcoulaud Hey! It seems that the database already had a type with this name and only 3 values ​​and it did not return an error about a duplicate. You can check this by running this query:
SELECT n.nspname as enum_schema, t.typname as enum_name, e.enumlabel as enum_value FROM pg_type t JOIN pg_enum e ON t.oid = e.enumtypid JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace;
If so, delete the type and run the migration again.
Hey Roman, I’ve updated my schema since then, but I remember that deleting the type and rerunning the migration did the trick. The key was to delete the type.
What version of
drizzle-orm
are you using?0.31.2
What version of
drizzle-kit
are you using?0.22.7
Describe the Bug
Hello there!
I created an enum in my schema:
, but it seems that only the first 3 are taking into account. The migration appears correct though:
But I look at my interface, I don't see the value
dropped
, and when I try to update my status with thedropped
enum, I get an error:error: invalid input value for enum status: "dropped"
Expected behavior
No response
Environment & setup
No response