Android
Android copied to clipboard
Migrate groups to proper unique id
The following points a required for a migration to unique ids for groups:
- [x] Edit the
LoyaltyCardDbGroupstable to contain a new ID column that's an integer. - [x] Edit the
LoyaltyCardDbIdsGroupstable to refer to the group ID instead of group name. - [x] Migrate all current memberships to the new setup.
@TheLastProject thinks, the easiest way is to just create 2 temporary tables and then create the new stuff like it has been done at newVersion 10 in the DBHelper class.
Originally posted by @TheLastProject in https://github.com/CatimaLoyalty/Android/issues/669#issuecomment-1256443883
These steps are needed, because the current situation is blocking for a good implementation of #669 for example.
Should the group names still all be distinct? For the moment it is not possible to create 2 "Test" groups, should this limitation remain? By the way, @TheLastProject you could assign me to the issue, I'm currently working on it.
Should the group names still all be distinct? For the moment it is not possible to create 2 "Test" groups, should this limitation remain?
I think that makes sense, I don't really see any benefit for users to make 2 groups with the exact same name after all.
By the way, @TheLastProject you could assign me to the issue, I'm currently working on it.
Thanks for picking this up! :)