add prisma table PK

pull/1773/head
Francis Cao 2023-01-02 16:47:48 -08:00
parent b46a0c179f
commit 660c810ec1
1 changed files with 1 additions and 0 deletions

View File

@ -46,6 +46,7 @@ async function checkTables() {
async function dropKeys() {
try {
// drop keys
await prisma.$executeRaw`ALTER TABLE IF EXISTS "_prisma_migrations" DROP CONSTRAINT IF EXISTS "_prisma_migrations_pkey" cascade;`;
await prisma.$executeRaw`ALTER TABLE IF EXISTS "account" DROP CONSTRAINT IF EXISTS "account_pkey" cascade;`;
await prisma.$executeRaw`ALTER TABLE IF EXISTS "event" DROP CONSTRAINT IF EXISTS "event_pkey" cascade;`;
await prisma.$executeRaw`ALTER TABLE IF EXISTS "session" DROP CONSTRAINT IF EXISTS "session_pkey" cascade;`;