skip to Main Content

Prisma problem inserting into autogenerated int ID field: integer out of range for type int4 – Postgresql

model Comment { id Int @id @default(autoincrement()) cid String bid String author AppProfile @relation(fields: [bid], references: [bid]) comment String created DateTime @default(now()) } const results = await prisma.comment.create({ data: { cid: req.body.cid, comment: req.body.comment, bid: appProfile.bid, }, }); prisma:query INSERT…

VIEW QUESTION

Count number of occurrences of value in JSON fields with pattern stored in JSON Column (Postgres) – Postgresql

I have a JSON column, telework, stored in Postgres which looks like "{ ..., "biweeklyWeek1-locationMon": "alternative", "biweeklyWeek1-locationTues": "agency", "biweeklyWeek1-locationWeds": "alternative", "biweeklyWeek1-locationThurs": "alternative", "biweeklyWeek1-locationFri": "alternative", ... , "biweeklyWeek2-locationMon": "alternative", "biweeklyWeek2-locationTues": "agency", "biweeklyWeek2-locationWeds": "alternative", "biweeklyWeek2-locationThurs": "alternative", "biweeklyWeek2-locationFri": "alternative", ... }" I need…

VIEW QUESTION
Back To Top
Search