In order to improve the application, it's necessary when a user adds an existing item in his storage from items list , update not to be available option to avoid interaction with other people storages. For example if i add Lemonade 0,5L from list in one of my storages and then update a lemonade's field , this update will interact and change the updated field of lemonade in every storage lemonade is included. There are 2 ways to fix this 1) Update not to be available in items, if a user isnt satisfied with existing items should create a new one 2) redesign the database permitting a user to update-edit everything ( I think this can be achieved with new tables in db for example user_item with a composite primary key ( user_id , item_id) and maybe some new relationships or entities )
In order to improve the application, it's necessary when a user adds an existing item in his storage from items list , update not to be available option to avoid interaction with other people storages. For example if i add Lemonade 0,5L from list in one of my storages and then update a lemonade's field , this update will interact and change the updated field of lemonade in every storage lemonade is included. There are 2 ways to fix this 1) Update not to be available in items, if a user isnt satisfied with existing items should create a new one 2) redesign the database permitting a user to update-edit everything ( I think this can be achieved with new tables in db for example user_item with a composite primary key ( user_id , item_id) and maybe some new relationships or entities )