Keep order of a list of items in prisma

I have an app that allows the user to reorder a list of items, with each item being a prisma model. To facilitate this, I have an index field that I can then order the items by when fetching. The problem with this approach is I have to update each item every time I delete or add an item. I'm wandering if:

- there's a built-in way to do this in prisma?
- is there a better way of doing this myself?

My model looks something like:
model Album { id String @id index Int title String? }
Was this page helpful?