João Vitor Casarin
07/26/2022, 11:03 PMTRUNCATE TABLE user RESTART IDENTITY CASCADE;... everytime I try to run that on both prisma.$queryRaw and on pgadmin I get the same error: 42601 syntax error at or near to "user"Nurul
07/27/2022, 6:44 AMTRUNCATE TABLE "public"."user" RESTART IDENTITY CASCADE in queryRaw?Nurul
07/29/2022, 1:35 PMNurul
08/02/2022, 6:00 AMJoão Vitor Casarin
08/03/2022, 1:33 PMJoão Vitor Casarin
08/03/2022, 1:34 PMTABLE from the query also did workJoão Vitor Casarin
08/03/2022, 1:34 PMNurul
08/03/2022, 1:36 PMJoão Vitor Casarin
08/03/2022, 1:37 PMmodel User {
id Int @id @default(autoincrement())
name String
email String @unique
password String
posts Post[] @relation("CreatedBy")
likedPosts Post[] @relation("LikedBy")
}
model Post {
id Int @id @default(autoincrement())
text String
createdAt DateTime @default(now())
author User @relation("CreatedBy", fields: [authorId], references: [id])
authorId Int
likedBy User[] @relation("LikedBy")
}
and the DB URL is postgresql://joao:12345678@localhost:5432/dev?schema=public