In the CLI, the ID is manually set when creating groups, which causes PostgreSQL to not increment the auto-increment value for the ID column. When a user tries to insert another group, it will always fail, since the auto-increment value is still set to 1 however a group with ID 1 already exists ("Guest").
There are two possible solutions to this:
Do not insert the ID manually, and then assert that the IDs are correct at the end of the insert(s).
Insert the IDs manually and then manually update the auto-increment value afterwards.
Technically, the ID of the groups shouldn't matter, but in my opinion, we should assert that the default groups are IDs 1-3 just in case.
In the CLI, the ID is manually set when creating groups, which causes PostgreSQL to not increment the auto-increment value for the ID column. When a user tries to insert another group, it will always fail, since the auto-increment value is still set to
1
however a group with ID1
already exists ("Guest").There are two possible solutions to this:
Technically, the ID of the groups shouldn't matter, but in my opinion, we should assert that the default groups are IDs 1-3 just in case.