Prisma reorders database

I've found out prisma reorders my database upon updating, any chance anyone know how I can stop it from reordering? I can't find anything on the prisma docs or in google..
4 Replies
Eylon
Eylon2y ago
I am using supabase which is postgresql
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Eylon
Eylon2y ago
If I am updating a record, it will go to the bottom of the table, so when I am fetching again, the order changes
Simon S.
Simon S.2y ago
Relying on the insertion order is kinda janky anyways. I would advise to create another column which is called something like „created_at“ which you would insert a timestamp of the creation date into. Then you can order by the timestamp which is much more robust
Want results from more Discord servers?
Add your server