Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Error setting default enum field values #2299

Open
Malin88 opened this issue May 11, 2024 · 1 comment
Open

[BUG]: Error setting default enum field values #2299

Malin88 opened this issue May 11, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Malin88
Copy link

Malin88 commented May 11, 2024

What version of drizzle-orm are you using?

0.29.5

What version of drizzle-kit are you using?

0.21.1

Describe the Bug

After update drizzle-kit to version 0.21.1 I cannot set default values for enum field.

export const userStatusEnum = pgEnum("status", ["inactive", "active", "banned"]);

createTable( "users", {
   status: userStatusEnum("status").default('inactive').notNull()
})

Returns error: invalid input value for enum status: "inactive". Before update everything works correctly

Expected behavior

Set the default status field value to "inactive".

Environment & setup

No response

@Malin88 Malin88 added the bug Something isn't working label May 11, 2024
@Alshafei2430
Copy link

I have the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants