Drizzle update enum

Hi everyone I am currently playing with drizzle and enum with postgres. However it doesn't seems to allow update ?
For example with this code:
export const updateExerciseTag = (tags: Exercise["tags"]) => {
  console.log(tags); // ['chest','legs']
  return db.update(exercises).set({ tags });
};


I get the following error (atteched, see image).

Here is the schema of the table in question:
export const exercsieTagsEnum = pgEnum("exercise_tag", [
  "legs",
  "chest",
  "biceps",
  "triceps",
 /*.......*/
]);

export const exercises = pgTable(
  "exercise",
  {
    id: uuid("id").defaultRandom().primaryKey(),
    /*.......*/
    tags: exercsieTagsEnum("tags").array(),
  }
);


Am I allowed to udpate the tags field in the exercise table with for example ['chest'] ?
Why am I getting an error when I do so ?
image.png
image.png
image.png
image.png
Was this page helpful?