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
I am using supabase which is postgresql
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
If I am updating a record, it will go to the bottom of the table, so when I am fetching again, the order changes
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