Skip to end of metadata
Go to start of metadata

Resources

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.

  1. Upgrade new sandbox to 3.3
  2. 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.
  3. 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).

  1. Delete all of the case related activities from target sandbox. We should have only those activities left, which are not related to cases.
  2. Run the script (to be written) which will iterate over this procedure:
    1. Connect to old sandbox database, retrieve a case and all its activities
    2. Create appropriate case in target sandbox
    3. Create Open Case activity for this case
    4. Create case activities based on information retrieved from old sandbox
    5. 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:

Pre migration script tasks

Go to Administer -> Global Settings -> Configuration -> Directories and update directories to start with /var/www/db...
Go to Administer -> Global Settings -> Configuration -> Resource URLs and set paths to correct settings (Resource URL: http://localhost:8282/db/sites/all/modules/civicrm/ and Image Upload URL: http://localhost:8282/db/files/civicrm/persist/contribute/)
Go to Administer -> Option Lists -> Relationship Types and rename "Case Coordinator" relationship to "Case researcher" (please mind the case of letters, it's important). It should be: Relationship Label-A to B: "Case researcher is", Relationship Label-B to A: "Case researcher", Description: "Case researcher"
Go to Administer -> Option Lists -> Activity Types and add "Case Review" and "Add Client To Case" activity types. Again, mind the letter cases. Label should be, respectively: "Case Review", "Add Client To Case" - both: Component: "CiviCase".

Data migration script

Put CIVICRM_SITE_KEY in civicrm.settings.php (some random string)
While you're there, put following line in civicrm.settings.php: define( 'CIVICRM_ACTIVITY_ASSIGNEE_MAIL', false );
Check out http://svn.civicrm.org/hrd/trunk/bin/Migrate.php.txt file, rename it to Migrate.php and put it in sites/all/modules/civicrm/bin/ directory of the instance you're going to upgrade.
Call following URL: db/sites/all/modules/civicrm/bin/Migrate.php?name=USERNAME&pass=PASSWORD&key=CIVICRM_SITE_KEY

Configure word replacements, blocks, turn on the HRD theme, make sure HRD module is turned on, clean up Activity Types (add new, remove obsolete). Search for activities of type FL Activity and go through them to eliminate this activity type (it's a legacy type for those which didn't have case_activity_type in old db).

Labels:

Creative Commons License
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-Share Alike 3.0 United States Licence.