Commit fd8d8793fb2ecb74f100d6bc5fcda7855fa4aef8
1 parent
ae4f9097
KTS-1388
"KnowledgeTree pre-3.0 upgrade problems" Updated. Committed By: Kevin Reviewed By: Conrad git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@6644 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
2 additions
and
1 deletions
sql/mysql/upgrade/2.0.9/storagemanager.sql
| 1 | ALTER TABLE `documents` ADD `storage_path` VARCHAR( 250 ) ; | 1 | ALTER TABLE `documents` ADD `storage_path` VARCHAR( 250 ) ; |
| 2 | ALTER TABLE `documents` ADD INDEX ( `storage_path` ) ; | 2 | ALTER TABLE `documents` ADD INDEX ( `storage_path` ) ; |
| 3 | -UPDATE `documents` SET storage_path = CONCAT(full_path, "/", filename) WHERE storage_path IS NULL; | 3 | +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; |
| 4 | +UPDATE `documents` d SET storage_path=CONCAT(CONCAT(CONCAT("Deleted/", d.id), "-"), d.filename) where status_id=3; |