I added a new value "expectedValue" to my schema, after creating many records, however i made it null-able so i didnt think it would be a problem:
model Procedure {
id Int @id @default(autoincrement())
stepNumber Int
step String
expectedValue String?
testCaseRef TestCase @relation(fields: [TestCaseId], references: [id])
TestCaseId Int
}
and now when i try to add a record for the expectedValue element, it cant seem to find it.
I can see that it exists in my database because im looking at it in a database tool (tablePLus)
const testCaseCreated = await prisma.TestCase.create({
data: {
name: '',
description: '',
Procedure: {
create: [
{
stepNumber: 1,
step: 'add a prof',
expectedValue: 'with vals'
~~~~~~~~~~~~~
}
]
},
tags: {
create: [
{
tag: {
connectOrCreate: {
where: {
tagName: 'create'
},
create: {
tagName: 'create'
}
}
}
}
]
},
TestCase_TestSuite: {
create: [
{
testSuite: {
connect: {
id: 86
}
}
}
]
}
}
})
the error im getting is: Unknown arg expectedValue
in data.Procedure.create.0.expectedValue for type ProcedureCreateWithoutTestCaseRefInput. Did you mean select
? Available args:
type ProcedureCreateWithoutTestCaseRefInput {
stepNumber: Int
step: String
}
Any help would be appreciated.
I fixed it by manually writing something in the expected values column on my database viewer and now prisma can find it, maybe its a bug in prisma.