censmart
censmart
PPrisma
Created by censmart on 2/2/2025 in #help-and-questions
Prisma extented Request type
8 try { → 19 const newTour = await db.tour.create({ data: { name: "the new forest hikers", price: 299, rating: 4.8, belongsTo: { connect: { id: undefined, ? email?: String, ? AND?: UserWhereInput | UserWhereInput[], ? OR?: UserWhereInput[], ? NOT?: UserWhereInput | UserWhereInput[], ? name?: StringFilter | String, ? password?: StringFilter | String, ? photo?: StringNullableFilter | String | Null, ? createdAt?: DateTimeFilter | DateTime, ? updatedAt?: DateTimeFilter | DateTime, ? tours?: TourListRelationFilter } } } }) I get undefined on the id field, i don't know why
5 replies
PPrisma
Created by censmart on 2/1/2025 in #help-and-questions
Prisma generate
I upgraded to prisma v6.3.0 and ran my prisma generate, then my vscode stopped picking the auto completion, what could i do
3 replies
PPrisma
Created by censmart on 1/27/2025 in #help-and-questions
Modeling data
Can i make my model for a specific field be lowercased just like doing something like this model User { email String @unique @@lower }
8 replies
PPrisma
Created by censmart on 1/21/2025 in #help-and-questions
mongodb connection with prisma
I tried pushing my mongodb database from the command line, and i am getting The provided database string is invalid. An invalid argument was provided: Database must be defined in the connection string in database URL. Please refer to the documentation in https://www.prisma.io/docs/reference/database-reference/connection-urls for constructing a correct connection string. In some cases, certain characters must be escaped. Please check the string for any illegal characters.
3 replies
PPrisma
Created by censmart on 12/11/2024 in #help-and-questions
types from @prisma/client
model User { id String @id @default(cuid()) username String @unique password String createdAt DateTime @default(now()) updatedAt DateTime @updatedAt products Product[] }, this is my user schema, i tried importing the type user like import type { User } from '@prisma/client'; i am getting an error of Module '"@prisma/client"' has no exported member 'User'., I just upgraded to prisma v6
6 replies