Cannot use pgEnum with aws aurora

Hi. I can't seem to use pgEnum with the AWS aurora adapter, as i keep getting the same error over and over. It seems weird, as intellisense doesn't say that the types are wrong at all when i am doing the update query, but pg returns an error
ERROR: column "status" is of type "EmailStatus" but expression is of type text; Hint: You will need to rewrite or cast the expression.; Position: 31; SQLState: 42804

await db
      .update(email)
      .set({ status: "sending", messageId: res.MessageId })
      .where(eq(email.emailId, msg.emailId))

export const emailStatus = pgEnum("EmailStatus", [
    "none",
    "sending",
    "sent",
    "cancelled",
])
export const email = pgTable(
    "email",
    {
        emailId: serial().primaryKey(),
        status: emailStatus().default("none"),
    },,
)
Was this page helpful?