Satish
PPrisma
•Created by Satish on 10/27/2024 in #help-and-questions
@unique and @index can't be used together
If I'm using
@@unique([id1, id2])
I cannot use @@index([id1, id2])
That's because @@unique already means indexed??4 replies
PPrisma
•Created by Satish on 8/2/2024 in #help-and-questions
Float datatype in MongoDB
I have this in my schema
I'm using MongoDB + prisma. How can I restrict the decimal place to 2 digits? ex: 2.12
2 replies
PPrisma
•Created by Satish on 3/31/2024 in #help-and-questions
UpdatedAt value changes if no field value changes?
What happens to the UpdatedAt field, if I over write a value of a field and no other fields value is changed. Does the updatedAt fields value reflect the current datetime or it remains unchanged?
Example, there is a flag field, with value 1. I perform a update on that record and still assign 1 as value to the flag field. Nothing else changes. Does the updatedAt fields value automatically get updated or it does not change - as non of the value in the record actually changed.
1 replies
PPrisma
•Created by Satish on 3/26/2024 in #help-and-questions
Query based on Time
I've a collection where I save date and time of the users last access. I have to send a notification exactly on same date and time next month. How can I write the query for it?
I already have a cron job setup. I just want to know how to write the query for it. I've previously worked with date, but I'm not sure how to query based on date and time.
Any help much appreciated. Thank you ..
7 replies