BEGIN; CREATE TABLE `new_tblUsers` ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `login` varchar(50) default NULL, `pwd` varchar(255) default NULL, `webauthn` varchar(1024) default NULL, `secret` varchar(50) default NULL, `fullName` varchar(100) default NULL, `email` varchar(70) default NULL, `language` varchar(32) NOT NULL, `theme` varchar(32) NOT NULL, `comment` text NOT NULL, `role` INTEGER NOT NULL REFERENCES `tblRoles` (`id`), `hidden` INTEGER NOT NULL default '0', `pwdExpiration` TEXT default NULL, `loginfailures` INTEGER NOT NULL default '0', `disabled` INTEGER NOT NULL default '0', `quota` INTEGER, `homefolder` INTEGER default NULL REFERENCES `tblFolders` (`id`), UNIQUE (`login`) ); INSERT INTO `new_tblUsers` SELECT * FROM `tblUsers`; DROP TABLE `tblUsers`; ALTER TABLE `new_tblUsers` RENAME TO `tblUsers`; CREATE TABLE `tblAttributeDefinitionGroups` ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `name` varchar(100) default NULL, `comment` text, UNIQUE(`name`) ); CREATE TABLE `tblAttributeDefinitionGroupAttributeDefinition` ( `attrdef` INTEGER REFERENCES `tblAttributeDefinitions` (`id`) ON DELETE CASCADE, `attrgrp` INTEGER REFERENCES `tblAttributeDefinitionGroups` (`id`) ON DELETE CASCADE, `sequence` double NOT NULL default '0', `show` INTEGER, UNIQUE(`attrdef`, `attrgrp`) ); CREATE TABLE `tblFolderAttributeDefinitionGroup` ( `folder` INTEGER REFERENCES `tblFolders` (`id`) ON DELETE CASCADE, `attrgrp` INTEGER REFERENCES `tblAttributeDefinitionGroups` (`id`) ON DELETE CASCADE, `sequence` double NOT NULL default '0', UNIQUE(`folder`, `attrgrp`) ); UPDATE tblVersion set major=6, minor=1, subminor=0; COMMIT;