Fix SINGLE_USER groups that were incorrectly created as MULTI_USER
@@ -31,3 +31,6 @@ CREATE TABLE IF NOT EXISTS GROUP_ADMIN (
ALTER TABLE `GROUP_ADMIN` ADD CONSTRAINT `GROUP_ADMIN_ibfk_1` FOREIGN KEY IF NOT EXISTS (`ADMIN_ID`, `DOMAIN_ID`) REFERENCES `SHARING_USER` (`USER_ID`, `DOMAIN_ID`) ON DELETE CASCADE ON UPDATE NO ACTION;
ALTER TABLE `GROUP_ADMIN` ADD KEY IF NOT EXISTS `ADMIN_ID` (`ADMIN_ID`,`DOMAIN_ID`);
+
+-- Some SINGLE_USER groups were incorrectly created as MULTI_USER
+update USER_GROUP set GROUP_CARDINALITY = 'SINGLE_USER' where GROUP_CARDINALITY = 'MULTI_USER' and OWNER_ID = GROUP_ID;
