Daniel Sieradski
07/16/2021, 3:37 PMglekner
07/16/2021, 8:05 PMDouglas
07/16/2021, 9:20 PMMo El
07/16/2021, 10:07 PMMo El
07/17/2021, 12:59 AMkhareta
07/17/2021, 3:33 AMPRIMARY KEY (`id`),
UNIQUE KEY `id_UNIQUE` (`id`),
UNIQUE KEY `locationId` (`locationId`),
KEY `userId` (`userId`),
CONSTRAINT `Item_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `User` (`id`),
CONSTRAINT `Item_ibfk_2` FOREIGN KEY (`locationId`) REFERENCES `Location` (`id`)
prisma migrate:
PRIMARY KEY (`id`)
UNIQUE INDEX `Item.locationId_unique`(`locationId`),
INDEX `userId`(`userId`),
ALTER TABLE `Item` ADD FOREIGN KEY (`userId`) REFERENCES `User`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
ALTER TABLE `Item` ADD FOREIGN KEY (`locationId`) REFERENCES `Location`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
From above you should see that migrate got two things wrong:
1- missing:
UNIQUE KEY `id_UNIQUE` (`id`)
2- wrong name, should have been `locationId`
UNIQUE INDEX `Item.locationId_unique`(`locationId`)
I checked the generated migration line by line. All tables are missing UNIQUE KEY id_UNIQUE (id)
, in addition to some tables having inconsistent index/key names; sometimes it's prepended by the table name, others isn't.
Also, would using these newly generated prisma index names cause any problems on production? (when base-lining for example)
Should I accept the initial migration and apply it as is, then run and edit a second migration to rename these indexes and missing constraints?Michael Dausmann
07/17/2021, 7:02 AMconst ids = [41, 55]
`const result = await prisma.$queryRaw`select * from users where id in (${ids})`;`
but I get a kernel panic
PANIC in /root/.cargo/git/checkouts/rust-postgres-dc0fca9be721a90f/8a61d46/postgres-types/src/lib.rs:762:18
expected array type
any Idea how I can achieve this?Logan Lee
07/17/2021, 7:28 AMLogan Lee
07/17/2021, 7:29 AMMichael Dausmann
07/17/2021, 7:36 AMMischa
07/17/2021, 12:38 PMMischa
07/17/2021, 12:38 PMDouglas
07/17/2021, 1:24 PMjoao.santos
07/17/2021, 2:07 PMkhareta
07/17/2021, 4:44 PMBusinessLocation.userId_unique
to userId_UNIQUE
, but received this:
ALTER TABLE `BusinessLocation` RENAME INDEX `userId_UNIQUE` TO `BusinessLocation.userId_unique`;
Please note that the initial migration was create-only
and this is the second one, also create-only
. nothing applied yet to db.Dan Shapir
07/17/2021, 8:20 PMkhareta
07/18/2021, 9:00 AMJason
07/19/2021, 1:58 AMprisma introspect
supposed to pull @default
attributes too? I ran the script and it seems that the attribute was dropped. Not sure why. Version 2.27 on postgres. Is anyone else experiencing this?Feralheart
07/19/2021, 9:51 AMuser
model where user.name
and user.email
are both unique ( @@unique([name, email])
) and when I want to upsert with these two properties I got the following error:
Type '{ name: string; email: string; }' is not assignable to type 'UsersWhereUniqueInput'.
Luca Nigido
07/19/2021, 10:14 AMLuca Nigido
07/19/2021, 10:20 AMGiuseppe
07/19/2021, 11:05 AMDustin
07/19/2021, 3:46 PMconnection_limit
parameter along with pgbouncer=true
?
Im asking this because im still getting errors saying Timed out fetching a new connection from the connection pool.
when my pgbouncer instances say they have 11 used_clients and 39 free_clients still.Slackbot
07/19/2021, 4:04 PMHei
07/19/2021, 4:46 PMprisma migrate deploy
in a docker-compose?Cameron Johnson
07/19/2021, 5:09 PMTimed out fetching a new connection from the connection pool.
After throwing this error once it stops making queries for good until restarted. I’m sure it’s a bug in my code but don’t know how to get insight into why those existing connections aren’t getting cleaned up.Andrew Obrigewitsch
07/19/2021, 5:27 PMJoão Hortale
07/19/2021, 5:44 PMGelo
07/20/2021, 6:29 AMGelo
07/20/2021, 6:29 AM