git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_SGD/tags/3.7.0.2_original@1 eb19766c-00d9-a042-a3a0-45cb8ec72764
5 lines
417 B
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;
|