Jesús Quirós
06/08/2021, 4:30 PMmodel Account {
id String @id @default(dbgenerated("my_schema.uuid_generate_v4()")) @db.Uuid
...
@@map(name: "accounts")
}
model Product {
id String @id @default(dbgenerated("my_schema.uuid_generate_v4()")) @db.Uuid
...
@@map(name: "products")
}
Every time I create or apply a migration Prisma generates the alter for the id columns despite the fact that those columns did not change:
-- AlterTable
ALTER TABLE "accounts" ALTER COLUMN "id" SET DEFAULT my_schema.uuid_generate_v4();
-- AlterTable
ALTER TABLE "products" ALTER COLUMN "id" SET DEFAULT my_schema.uuid_generate_v4();
Is this a bug? Am I doing something wrong here?
Environment:
prisma ^2.24.1
PostgreSQL 13.2
Thanks in advance for your help 🙂Daniel Norman
tom
06/10/2021, 2:47 PMJesús Quirós
06/11/2021, 12:56 AM