Changeset 146 for trunk/Modules/User/ModuleUser.pas
- Timestamp:
- Dec 29, 2023, 11:44:26 PM (11 months ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/User/ModuleUser.pas
r145 r146 1 unit UModuleUser;1 unit ModuleUser; 2 2 3 3 interface 4 4 5 5 uses 6 Classes, SysUtils, UModularSystem, U User, UModuleBase, UWebPage;6 Classes, SysUtils, UModularSystem, User, ModuleBase, UWebPage; 7 7 8 8 type … … 30 30 31 31 uses 32 UCore, USqlDatabase, UUserControlPage;32 Core, USqlDatabase, UserControlPage; 33 33 34 34 { TModuleUser } … … 84 84 DbRows := TDbRows.Create; 85 85 86 Core.Co mmonDatabase.Query(DbRows,86 Core.Core.CommonDatabase.Query(DbRows, 87 87 'CREATE TABLE IF NOT EXISTS `User` (' + 88 88 ' `Id` int(11) NOT NULL AUTO_INCREMENT,' + … … 96 96 ') ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;'); 97 97 98 Core.Co mmonDatabase.Query(DbRows,98 Core.Core.CommonDatabase.Query(DbRows, 99 99 'CREATE TABLE IF NOT EXISTS `UserOnline` (' + 100 100 ' `Id` int(11) NOT NULL AUTO_INCREMENT,' + … … 110 110 ') ENGINE=MEMORY DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;'); 111 111 112 Core.Co mmonDatabase.Query(DbRows,112 Core.Core.CommonDatabase.Query(DbRows, 113 113 'CREATE TABLE IF NOT EXISTS `PermissionGroup` (' + 114 114 ' `Id` int(11) NOT NULL AUTO_INCREMENT,' + … … 117 117 ') ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;'); 118 118 119 Core.Co mmonDatabase.Query(DbRows,119 Core.Core.CommonDatabase.Query(DbRows, 120 120 'CREATE TABLE IF NOT EXISTS `PermissionGroupAssignment` (' + 121 121 ' `Id` int(11) NOT NULL AUTO_INCREMENT,' + … … 129 129 ') ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;'); 130 130 131 Core.Co mmonDatabase.Query(DbRows,131 Core.Core.CommonDatabase.Query(DbRows, 132 132 'CREATE TABLE IF NOT EXISTS `PermissionOperation` (' + 133 133 ' `Id` int(11) NOT NULL AUTO_INCREMENT,' + … … 143 143 ') ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;'); 144 144 145 Core.Co mmonDatabase.Query(DbRows,145 Core.Core.CommonDatabase.Query(DbRows, 146 146 ' CREATE TABLE IF NOT EXISTS `PermissionUserAssignment` (' + 147 147 ' `Id` int(11) NOT NULL AUTO_INCREMENT,' + … … 155 155 ') ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 ;'); 156 156 157 Core.Co mmonDatabase.Query(DbRows,157 Core.Core.CommonDatabase.Query(DbRows, 158 158 'ALTER TABLE `PermissionGroupAssignment`' + 159 159 ' ADD CONSTRAINT `PermissionGroupAssignment_ibfk_1` FOREIGN KEY (`Group`) REFERENCES `permissiongroup` (`Id`),' + … … 161 161 ' ADD CONSTRAINT `PermissionGroupAssignment_ibfk_3` FOREIGN KEY (`AssignedOperation`) REFERENCES `permissionoperation` (`Id`);'); 162 162 163 Core.Co mmonDatabase.Query(DbRows,163 Core.Core.CommonDatabase.Query(DbRows, 164 164 'ALTER TABLE `PermissionUserAssignment`' + 165 165 ' ADD CONSTRAINT `PermissionUserAssignment_ibfk_1` FOREIGN KEY (`User`) REFERENCES `user` (`Id`),' + … … 180 180 DbRows := TDbRows.Create; 181 181 182 Core.Co mmonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `PermissionUserAssignment`');183 Core.Co mmonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `PermissionGroupAssignment`');184 Core.Co mmonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `PermissionGroup`');185 Core.Co mmonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `PermissionOperation`');186 Core.Co mmonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `User`');187 Core.Co mmonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `UserOnline`');182 Core.Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `PermissionUserAssignment`'); 183 Core.Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `PermissionGroupAssignment`'); 184 Core.Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `PermissionGroup`'); 185 Core.Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `PermissionOperation`'); 186 Core.Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `User`'); 187 Core.Core.CommonDatabase.Query(DbRows, 'DROP TABLE IF EXISTS `UserOnline`'); 188 188 finally 189 189 DbRows.Free;
Note:
See TracChangeset
for help on using the changeset viewer.