Ignore:
Timestamp:
Feb 17, 2021, 9:27:32 PM (3 years ago)
Author:
chronos
Message:
  • Added: Documents section accessible from users panel.
  • Added: Contract model moved to separate module Contract.
  • Added: New action to generate PDF from Contract.
  • Fixed: Allow users to download files only by hash instead of direct id.
  • Added: Support for SHA1 as allowed mysql function.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/UpdateTrace.php

    r890 r901  
    21342134  $Manager->Execute('ALTER TABLE `FinanceOperation` CHANGE `Value` `Value` FLOAT NOT NULL DEFAULT "0";');
    21352135  $Manager->Execute('ALTER TABLE `NetworkInterface` CHANGE `OnlineNotify` `OnlineNotify` INT(11) NOT NULL DEFAULT "0";');
     2136}
     2137
     2138function UpdateTo901(UpdateManager $Manager): void
     2139{
     2140  $Manager->Execute('ALTER TABLE `Member` ADD `Contract` INT NULL DEFAULT NULL AFTER `ChangeReplaceId`;');
     2141  $Manager->Execute('ALTER TABLE `Member` ADD FOREIGN KEY (`Contract`) REFERENCES `Contract`(`Id`) ON DELETE RESTRICT ON UPDATE RESTRICT;');
     2142  $Manager->Execute("INSERT INTO `Module` (`Id`, `Name`, `Title`, `Version`, `Creator`, `License`, `Installed`, `HomePage`, `Description`) VALUES (NULL, 'Contract', '', '', '', '', '0', '', '');");
     2143  $Manager->Execute("INSERT INTO `Module` (`Id`, `Name`, `Title`, `Version`, `Creator`, `License`, `Installed`, `HomePage`, `Description`) VALUES (NULL, 'Document', '', '', '', '', '0', '', '');");
     2144  $Manager->Execute("INSERT INTO `PermissionOperation` (`Id`, `Module`, `Operation`, `Item`, `ItemId`) VALUES (NULL, '1', 'DisplayCustomerDocuments', '', '0');");
     2145  $Manager->Execute("INSERT INTO `PermissionGroupAssignment` (`Id`, `Group`, `AssignedGroup`, `AssignedOperation`) VALUES (NULL, '3', NULL, '52');");
     2146  $Manager->Execute('ALTER TABLE `File` ADD `Hash` VARCHAR(255) NOT NULL AFTER `Time`;');
     2147  $Manager->Execute("UPDATE `File` SET `Hash` = SHA1(CONCAT(Id,Name,Size,Time))");
     2148  $Manager->Execute("ALTER TABLE `Contract` ADD `Generate` INT NOT NULL DEFAULT '0' AFTER `File`;");
     2149  $Manager->Execute("ALTER TABLE `Contract` DROP `BillCodeText`;");
     2150  $Manager->Execute("INSERT INTO `FileDirectory` (`Id`, `Name`, `Parent`) VALUES (NULL, 'smlouvy', NULL);");
     2151  $Manager->Execute("ALTER TABLE `Log` CHANGE `Value` `Value` MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;");
     2152  $Manager->Execute("INSERT INTO `PermissionOperation` (`Id`, `Module`, `Operation`, `Item`, `ItemId`) VALUES (NULL, '4', 'DownloadById', '', '0');");
     2153  $Manager->Execute("INSERT INTO `PermissionGroupAssignment` (`Id`, `Group`, `AssignedGroup`, `AssignedOperation`) VALUES (NULL, '4', NULL, '53');");
    21362154}
    21372155
     
    22402258      880 => array('Revision' => 882, 'Function' => 'UpdateTo882'),
    22412259      882 => array('Revision' => 885, 'Function' => 'UpdateTo885'),
     2260      885 => array('Revision' => 901, 'Function' => 'UpdateTo901'),
    22422261    );
    22432262  }
Note: See TracChangeset for help on using the changeset viewer.