Kavita Nambissan
05/23/2022, 12:11 PMnpx prisma db pull and npx prisma generate and now I cannot create any records due to an error The column new does not exist There was no column new to begin with. I don't use prisma migrate the database is modified manually by the team, and it makes sense to update the Prisma schema as per the database. This is only happening with this one table. Any suggestions on what could be wrong? Thank you!Richard Ward
05/23/2022, 12:24 PMprisma.schema file get updated with the new column?Kavita Nambissan
05/23/2022, 12:42 PMKavita Nambissan
05/23/2022, 12:43 PMlongtude to longitude It was a typo fix. Not sure where new comes in..Richard Ward
05/23/2022, 12:45 PMnpx prisma generate ?Kavita Nambissan
05/23/2022, 12:57 PMnpx generate works fine. When I try to run a prisma.affectedtable.create it fails with this error.Richard Ward
05/23/2022, 1:01 PM"AffectedTable"CreateInput type look like in your generated prisma index.d.ts file?Kavita Nambissan
05/23/2022, 1:23 PMindex.d.ts file.. 🙂Richard Ward
05/23/2022, 1:24 PMcreate look like?Richard Ward
05/23/2022, 1:24 PMKavita Nambissan
05/23/2022, 1:28 PMcreate There is no column in there by the name new I use a util method to map my schema names to DB names, so the final input is specific.
await prisma.table_name.create({
data: finalData, // finalData is just a transformed object with columns names to values
include: {
...someIncludeFields
},
});Kavita Nambissan
05/23/2022, 1:29 PMinput CreateEntryInput {
status: String = "active"
email: EmailScalar!
mobilePhone: String
officePhone: String
addressLine1: String
city: String
state: String
zipCode: String
companyName: String!
serviceIds: [Int!]
contactId: Int
}Kavita Nambissan
05/23/2022, 1:29 PMRichard Ward
05/23/2022, 1:29 PMfinalData ..Kavita Nambissan
05/23/2022, 1:29 PMKavita Nambissan
05/23/2022, 1:30 PMRichard Ward
05/23/2022, 1:30 PMRichard Ward
05/23/2022, 1:31 PMKavita Nambissan
05/23/2022, 1:32 PM