Marius Popa
09/22/2022, 10:01 AMnpx prisma migrate dev which created the latest version of the db. Locally I could see the new field in the migration, commited and pushed to github and created a PR for the change. When my colleague checked my PR, everything was alright and it was merged. However, our Dev branch is connected to the test server and the db migration seemed to fail for it, the field is not there. I would appreciate a lot if someone has some time to look over the error I drop in the comments of this thread, maybe you encounter the problem too : ) thank you a lot!Marius Popa
09/22/2022, 10:01 AM[2022-09-21 14:54:58] info - Checking validity of types...
[2022-09-21 14:55:07] Failed to compile.
[2022-09-21 14:55:07]
[2022-09-21 14:55:07] ./pages/api/demographics.ts:12:61
[2022-09-21 14:55:07] Type error: Type '{ education: any; gender: any; income: any; age: any; soisResultId: any; familyMember: any; }' is not assignable to type '(Without<DemographicsCreateInput, DemographicsUncheckedCreateInput> & DemographicsUncheckedCreateInput) | (Without<...> & DemographicsCreateInput)'.
[2022-09-21 14:55:07] Object literal may only specify known properties, and 'familyMember' does not exist in type '(Without<DemographicsCreateInput, DemographicsUncheckedCreateInput> & DemographicsUncheckedCreateInput) | (Without<...> & DemographicsCreateInput)'.
[2022-09-21 14:55:07]
[2022-09-21 14:55:07] 10 | try {
[2022-09-21 14:55:07] 11 | const result = await prisma.demographics.create({
[2022-09-21 14:55:07] > 12 | data: { education, gender, income, age, soisResultId, familyMember },
[2022-09-21 14:55:07] | ^
[2022-09-21 14:55:07] 13 | });
[2022-09-21 14:55:07] 14 | res.json(result);
[2022-09-21 14:55:07] 15 | } catch (error) {
[2022-09-21 14:55:07] npm noticeMarius Popa
09/22/2022, 10:11 AMJarupong
09/22/2022, 11:07 AMJarupong
09/22/2022, 11:08 AMnpx prisma migrate deploy && npm start to npx prisma migrate deploy && npx prisma generate npm startJarupong
09/22/2022, 11:09 AMMarius Popa
09/22/2022, 11:23 AMMarius Popa
09/22/2022, 11:24 AMJarupong
09/22/2022, 11:25 AMJarupong
09/22/2022, 11:26 AMMarius Popa
09/22/2022, 1:04 PMVladi Stevanovic