Enum array column

Hey there,

anyone got an idea why doesn't this work:

typescript 
// my column:
modules: productModuleEnum("productModule")
    .array()
    .notNull()
    .default(sql`ARRAY[]::text[]`),

// my enum:
export const productModuleEnum = pgEnum("productModule", [
  ProductModule.Specifications,
]);


the error:

PostgresError: type "productmodule[]" does not exist

but... why?
Was this page helpful?