Skip to content
Snippets Groups Projects
Commit bf957037 authored by Jared Hancock's avatar Jared Hancock
Browse files

Change attachment migration process for upgrade

Don't migrate attachments as part of the 1.6* major upgrade. Wait unit
transitioning to schema signature dd0022fb, where the new table for
file_chunks is created.

Incremental developers will already have the columns dropped from the
%ticket_attachments table and will receive an error for the cleanup script,
but the upgrader is configured to ignore errors from the cleanup scripts.
parent e51bb66f
No related branches found
No related tags found
No related merge requests found
...@@ -269,8 +269,6 @@ class Upgrader extends SetupWizard { ...@@ -269,8 +269,6 @@ class Upgrader extends SetupWizard {
$tasks=array(); $tasks=array();
switch($phash) { //Add patch specific scripted tasks. switch($phash) { //Add patch specific scripted tasks.
case 'c00511c7-7be60a84': //V1.6 ST- 1.7 * {{MD5('1.6 ST') -> c00511c7c1db65c0cfad04b4842afc57}} case 'c00511c7-7be60a84': //V1.6 ST- 1.7 * {{MD5('1.6 ST') -> c00511c7c1db65c0cfad04b4842afc57}}
$tasks[] = array('func' => 'migrateAttachments2DB',
'desc' => 'Migrating attachments to database, it might take a while depending on the number of files.');
$tasks[] = array('func' => 'migrateSessionFile2DB', $tasks[] = array('func' => 'migrateSessionFile2DB',
'desc' => 'Transitioning to db-backed sessions'); 'desc' => 'Transitioning to db-backed sessions');
break; break;
...@@ -282,6 +280,10 @@ class Upgrader extends SetupWizard { ...@@ -282,6 +280,10 @@ class Upgrader extends SetupWizard {
$tasks[] = array('func' => 'migrateGroupDeptAccess', $tasks[] = array('func' => 'migrateGroupDeptAccess',
'desc' => 'Migrating group\'s department access to a new table'); 'desc' => 'Migrating group\'s department access to a new table');
break; break;
case '15b30765-dd0022fb':
$tasks[] = array('func' => 'migrateAttachments2DB',
'desc' => 'Migrating attachments to database, it might take a while depending on the number of files.');
break;
} }
//Check IF SQL cleanup exists. //Check IF SQL cleanup exists.
......
-- Drop fields we no longer need in the reference table.
-- NOTE: This was moved from the 1.6* major upgrade script because the
-- handling of attachments changed with dd0022fb
ALTER TABLE `%TABLE_PREFIX%ticket_attachment`
DROP `file_size`,
DROP `file_name`,
DROP `file_key`,
DROP `updated`,
DROP `isdeleted`;
...@@ -4,14 +4,6 @@ ALTER TABLE `%TABLE_PREFIX%config` ...@@ -4,14 +4,6 @@ ALTER TABLE `%TABLE_PREFIX%config`
DROP COLUMN `timezone_offset`, DROP COLUMN `timezone_offset`,
DROP COLUMN `api_passphrase`; DROP COLUMN `api_passphrase`;
-- Drop fields we no longer need in the reference table.
ALTER TABLE `%TABLE_PREFIX%ticket_attachment`
DROP `file_size`,
DROP `file_name`,
DROP `file_key`,
DROP `updated`,
DROP `isdeleted`;
-- Drop fields we no longer need in staff table. -- Drop fields we no longer need in staff table.
ALTER TABLE `%TABLE_PREFIX%staff` ALTER TABLE `%TABLE_PREFIX%staff`
DROP `append_signature`, DROP `append_signature`,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment