iamgmd
iamgmd7mo ago

Is there a way to specify _creationTime on a mutation?

Hi, I am importing data from another source and I would like to specify the _creationTime manually but _creationTime does not exist on the type.
4 Replies
erquhart
erquhart7mo ago
Has to be created by the system I personally keep created_at and updated_at fields on all my tables for this reason Makes the records more durable in import/export scenarios. _creationTimestamp is still useful for stable sorting and such.
iamgmd
iamgmdOP7mo ago
Thanks you for the quick response. That makes total sense, i'll update my schema... do you store created_at, updated_at as a number like _creationTime or do you store it as ISOString?
erquhart
erquhart7mo ago
I use string for mine
lee
lee7mo ago
btw there is one way to set _creationTime on documents -- with a npx convex import

Did you find this page helpful?