diff --git a/prisma/migrations/20250103150109_fix_invite_cuid_insecure/migration.sql b/prisma/migrations/20250103150109_fix_invite_cuid_insecure/migration.sql new file mode 100644 index 00000000..400c0c26 --- /dev/null +++ b/prisma/migrations/20250103150109_fix_invite_cuid_insecure/migration.sql @@ -0,0 +1,2 @@ +-- AlterTable +ALTER TABLE "Invite" ALTER COLUMN "id" SET DEFAULT encode(gen_random_bytes(16), 'hex'::text); diff --git a/prisma/schema.prisma b/prisma/schema.prisma index dc38f489..ea6490f2 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -467,7 +467,7 @@ model LnWith { } model Invite { - id String @id @default(cuid()) + id String @id @default(dbgenerated("encode(gen_random_bytes(16), 'hex'::text)")) createdAt DateTime @default(now()) @map("created_at") updatedAt DateTime @default(now()) @updatedAt @map("updated_at") userId Int