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]: DatabaseErrorException: ERROR: operator does not exist: uuid = text; Hint: No operator matches the given name and argument types. You might need to add explicit type casts.; Position: 54; SQLState: 42883 #2583

Open
trevorpfiz opened this issue Jul 3, 2024 · 3 comments
Assignees
Labels
bug Something isn't working drizzle/studio Issues related to Drizzle Studio

Comments

@trevorpfiz
Copy link

What version of drizzle-orm are you using?

0.31.2

What version of drizzle-kit are you using?

0.22.8

Describe the Bug

When I use driver: "aws-data-api" with an RDS database I can't update or delete in the studio without this error: [BUG]: DatabaseErrorException: ERROR: operator does not exist: uuid = text; Hint: No operator matches the given name and argument types. You might need to add explicit type casts.; Position: 54; SQLState: 42883

Following this https://ion.sst.dev/docs/start/aws/drizzle/.

Cross-posting this to drizzle-orm from #3409

Expected behavior

I would expect to be able to update and delete from the studio like when using other databases.

Environment & setup

I have only tested development with sst shell drizzle-kit studio.

@trevorpfiz trevorpfiz added the bug Something isn't working label Jul 3, 2024
@Morphexe
Copy link

Morphexe commented Jul 4, 2024

It seems this also happens when using enums in my case:

Error: ERROR: operator does not exist: agent_task = text; Hint: No operator matches the given name and argument types. You might need to add explicit type casts.; Position: 1879; SQLState: 42883

@RomanNabukhotnyi RomanNabukhotnyi added the drizzle/studio Issues related to Drizzle Studio label Aug 26, 2024
@RomanNabukhotnyi RomanNabukhotnyi self-assigned this Aug 26, 2024
@telgueta
Copy link

telgueta commented Aug 27, 2024

any way to solve this? the same is happening to me. It started happening when i change my serial primary key to uuid type:

export const SHIPMENTS = EDI_SCHEMA.table(
  "shipments",
  {
    id: uuid("id").primaryKey().defaultRandom(),
    bookingNumber: text("bookingNumber").notNull(),
    billOfLading: text("billOfLading").unique(),
    company: text("company").notNull(),
    pol: text("pol").notNull(),
    pod: text("pod").notNull(),
    finalPod: text("finalPod"),
    carrier: text("carrier").notNull(),
    createdAt: timestamp("createdAt"),
    updatedAt: timestamp("updatedAt"),
  },
  (t) => ({
    bl_company: unique("bl_company")
      .on(t.billOfLading, t.company)
      .nullsNotDistinct(),
  })
);

@valentinbeggi
Copy link

Any news on this ? I'm getting the same issue, which makes the studio unusable 🥲
Thanks!

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

No branches or pull requests

5 participants