Resources
- Sandbox with no data, CiviCase in target shape (3.2.3): http://hrd.dev.civicrm.org/ (new sandbox)
- Sandbox with legacy obscured data (2.1.2): http://hrd-legacy.dev.civicrm.org/db/ (old sandbox)
Steps
Below plan is assuming worst case scenario, that we will have to migrate the data by creating case one after another, because integrity of case data is lost upon standard upgrade. However, after initial research, it seems this might not be needed and we will need only relatively small adjustments. Below plan will be adjusted after first test upgrade.
- Upgrade new sandbox to 3.3
- Upgrade old sandbox to 3.3
- we will loose some data (most probably all of the cases and case-activity relation info)
- this upgrade should properly handle contacts, activities, grants, events, participation, groups, etc.
- Manually move case setup (and potentially other modifications) from new sandbox to upgraded old sandbox
At this stage we are changing the purpose of both sandboxes. We're reverting old sandbox to original state (2.1.2) and putting upgraded old sandbox (containing all of the necessary data apart from cases) into new sandbox (called target sandbox now).
- Delete all of the case related activities from target sandbox. We should have only those activities left, which are not related to cases.
- Run the script (to be written) which will iterate over this procedure:
- Connect to old sandbox database, retrieve a case and all its activities
- Create appropriate case in target sandbox
- Create Open Case activity for this case
- Create case activities based on information retrieved from old sandbox
- Perform status changes on newly created case as appropriate
Best case scenario assumes, that we will have all the necessary data available after standard upgrade procedure and will only need to do some relatively minor adjustments, like creating open case activities for all of the cases.
Upgrade notes
Do backups, download civicrm-2.1.2, civicrm-2.2.9 and latest civicrm-3.3 bundles, as well as newest Drupal 6 bundle.
Disable HRD module, remove completely or comment out CIVICRM_HRD line from civicrm.settings.php (do not set to 0), go to Administer CiviCRM > Global Settings > Directories and empty "Custom templates" and "Custom PHP" inputs, also turn on Garland theme in Drupal.
Dump the database data.
Dump custom data structure.
Dump drupal database and files.
On new server:Create databases.
Unpack drupal files
Load clean 2.1.2 schema.
At this stage, make sure that db runs off InnoDB engine (show create table any_table).
Load custom fields schema.
Add HRD specific schema modifications.
Load dumped data.
Load drupal database, make sure you can log in into database with user 'admin', do some changes
Edit sites/default/*settings* comment CIVICRM_HRD, change: mysql, CIVICRM_TEMPLATE_COMPILEDIR, CIVICRM_UF_BASEURL
Disable HRD module
Remove completely or comment out CIVICRM_HRD line from civicrm.settings.php (do not set to 0),
Go to Administer CiviCRM > Global Settings > Directories and empty "Custom templates" and "Custom PHP" inputs,
Turn on Garland theme in Drupal.
Change Administer › Site configuration > File system folder if needed
Perform an upgrade to 2.2.9
Instructions: Upgrade Drupal Sites to 2.2
Perform an upgrade to latest 3.3
Instructions: Upgrade Drupal Sites to 3.3
Note: For some reason, Drupal's .htaccess got rewritten by our upgrade script (?!!!), resulting in 403 status for whole Drupal installation, after reverting to old .htaccess, things seem to be working ok. Case data and activity data seem to be intact so far.
Upgrade Drupal to latest version.
Configure CiviCase:
Copy case type xml files into appropriate place.
Run queries:
