This repository has been archived on 2024-11-28. You can view files and clone it, but cannot push or open issues or pull requests.
Incam_SGD/sql/mysql/upgrade/2.0.9/storagemanager.sql

5 lines
417 B
SQL

ALTER TABLE `documents` ADD `storage_path` VARCHAR( 250 ) ;
ALTER TABLE `documents` ADD INDEX ( `storage_path` ) ;
UPDATE `documents` d SET storage_path = (select CONCAT(CONCAT(CONCAT(CONCAT(f.full_path, "/"), f.name), "/"), filename) from folders f where f.id=d.folder_id) WHERE storage_path IS NULL;
UPDATE `documents` d SET storage_path=CONCAT(CONCAT(CONCAT("Deleted/", d.id), "-"), d.filename) where status_id=3;