My schema has the following line under one type of...
# mongodb
m
My schema has the following line under one type of document:
Copy code
level          Int         @default(2)
But the level attribute isn't getting populated at all when I make a new document of this type. Why is that?
1
the createdAt and updatedAt fields aren't getting populated either (@default(now())). All three fields are recent additions to the Model, but I ran
Copy code
npx prisma db push
so I'm not understanding why the fields aren't being incorporated. I even added level to the database document manually, and my prisma.find function still isn't picking up the variable.
Other @default fields are populating correctly. Is it because they've been part of the Model longer, or because they're Strings?
Figured it out -- changes to my schema.prisma file weren't restarting my backend like changes in js files were. So I had to make the backend restart to reflect the change.