@bobbybouwmann This is what I did at the beginning. but things get more complicated.
I created an "app_versions" table in DB and created a pivot table with "book_id" and "version_id" columns.
but handling and inserting app versions in the API is not a good idea. because there are two kinds of apps: android and iOS. and these two have their own major and minor versions. and minor versions are not the same. so an "OS" column is needed in the versions table. and we should assign every single book to all these major and minor versions for both OSs.
minor versions in iOS and Android apps are different. every minor version in each OS should be inserted in the "app_versions" table in the API, and then all the books in the pivot table should be repeated.
See? this solution leads to complications as the app grows.
So a better solution is that we version the data in API, instead of keeping track of app versions in the API. and let the app decide which dataVersion to choose through API versioning.
now I want to know is this a reasonable solution? is there a standard or best practice to handle this scenario?