error: column "id" cannot be cast automatically to type uuid

im using drizzle, and this is my schema:
export const tags = pgTable("tags", {
  id: uuid("id").defaultRandom().primaryKey(),
  tag: text("tag").notNull(),
});


when I tried pushing it:
tomri:/mnt/t/Projects/AGSCraft/binary lab/rough $ bun drizzle-kit push:pg
drizzle-kit: v0.19.13
drizzle-orm: v0.28.6

No config path provided, using default path
Reading config file '/mnt/t/Projects/AGSCraft/binary lab/rough/drizzle.config.ts'
error: column "id" cannot be cast automatically to type uuid
    at Parser.parseErrorMessage (/mnt/t/Projects/AGSCraft/binary lab/rough/node_modules/drizzle-kit/index.cjs:40722:98)
    at Parser.handlePacket (/mnt/t/Projects/AGSCraft/binary lab/rough/node_modules/drizzle-kit/index.cjs:40563:25)
    at Parser.parse (/mnt/t/Projects/AGSCraft/binary lab/rough/node_modules/drizzle-kit/index.cjs:40487:34)
    at Socket.<anonymous> (/mnt/t/Projects/AGSCraft/binary lab/rough/node_modules/drizzle-kit/index.cjs:40763:44)
    at Socket.emit (node:events:515:28)
    at addChunk (node:internal/streams/readable:545:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:495:3)
    at Readable.push (node:internal/streams/readable:375:5)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
  length: 169,
  severity: 'ERROR',
  code: '42804',
  detail: undefined,
  hint: 'You might need to specify "USING id::uuid".',
  position: undefined,
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: undefined,
  table: undefined,
  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'tablecmds.c',
  line: '12332',
  routine: 'ATPrepAlterColumnType'
}
image.png
image.png
Was this page helpful?