diff --git a/modules/vebal/vebal.prisma b/modules/vebal/vebal.prisma index 119f4778d..df28431b5 100644 --- a/modules/vebal/vebal.prisma +++ b/modules/vebal/vebal.prisma @@ -31,7 +31,7 @@ model PrismaVotingGauge { id String chain Chain - stakingGauge PrismaPoolStakingGauge? @relation(fields: [id, chain], references: [id, chain]) + stakingGauge PrismaPoolStakingGauge? @relation(fields: [stakingGaugeId, chain], references: [id, chain]) status PrismaVotingGaugeStatus @default(ACTIVE) gaugeAddress String stakingGaugeId String? diff --git a/prisma/migrations/20231204142011_remove_constraint_votinggauge/migration.sql b/prisma/migrations/20231204142011_remove_constraint_votinggauge/migration.sql new file mode 100644 index 000000000..4b0b35734 --- /dev/null +++ b/prisma/migrations/20231204142011_remove_constraint_votinggauge/migration.sql @@ -0,0 +1,2 @@ +-- DropIndex +DROP INDEX "PrismaVotingGauge_stakingGaugeId_chain_key"; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index b4ee18b87..79f305c65 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -850,7 +850,7 @@ model PrismaVotingGauge { id String chain Chain - stakingGauge PrismaPoolStakingGauge? @relation(fields: [id, chain], references: [id, chain]) + stakingGauge PrismaPoolStakingGauge? @relation(fields: [stakingGaugeId, chain], references: [id, chain]) status PrismaVotingGaugeStatus @default(ACTIVE) gaugeAddress String stakingGaugeId String?