/** * Run the pre upgrade for this module. This can use the old config data before it * has been changed from the config. * @param string $old_vers * @param string $new_vers * @param I2CE_MagicDataNode $new_storage * @return boolean */ public function pre_upgrade($old_vers, $new_vers, $new_storage) { if (I2CE_Validate::checkVersion($old_vers, '<', '3.2.3')) { /** * In 3.2.3 some lists were moved to magicdata storage so we need to save * any old record ids for the old lists for later reference before any field * types get changed in magic data. */ $migrate_path = "/I2CE/formsData/migrate_data/3.2.3"; I2CE_FormStorage::storeMigrateData(array("region" => array("country"), "district" => array("region"), "county" => array("district")), $migrate_path); } return parent::pre_upgrade($old_vers, $new_vers, $new_storage); }
/** * Run the pre upgrade for this module. This can use the old config data before it * has been changed from the config. * @param string $old_vers * @param string $new_vers * @param I2CE_MagicDataNode $new_storage * @return boolean */ public function pre_upgrade($old_vers, $new_vers, $new_storage) { if (I2CE_Validate::checkVersion($old_vers, '<', '3.2.5')) { /** * In 3.2.3 some lists were moved to magicdata storage so we need to save * any old record ids for the old lists for later reference before any field * types get changed in magic data. */ if (!$this->pre_migrate()) { return false; } } elseif (I2CE_Validate::checkVersion($old_vers, '<', '3.2.6')) { /** * In 3.2.6 currency was updated so the salary_grade fields * need to be migrated. This only needs to happen when going from * 3.2.5 to 3.2.6 otherwise the standard migrate for pre3.2.5 handles it. */ if (!$this->pre_migrate326()) { return false; } } return parent::pre_upgrade($old_vers, $new_vers, $new_storage); }
/** * Run the pre upgrade for this module. This can use the old config data before it * has been changed from the config. * @param string $old_vers * @param string $new_vers * @param I2CE_MagicDataNode $new_storage * @return boolean */ public function pre_upgrade($old_vers, $new_vers, $new_storage) { if (I2CE_Validate::checkVersion($old_vers, '<', '3.2.10')) { /** * In 3.2.3 some lists were moved to magicdata storage so we need to save * any old record ids for the old lists for later reference before any field * types get changed in magic data. */ if (!$this->pre_migrate()) { return false; } } elseif (I2CE_Validate::checkVersion($old_vers, '<', '3.2.12')) { /** * Currency was update in 3.2.12 so it needs to be migrated when * going from 3.2.10 to 3.2.12 otherwise the default migrate * will work. */ if (!$this->pre_migrate3212()) { return false; } } return parent::pre_upgrade($old_vers, $new_vers, $new_storage); }
/** * Run the pre upgrade for this module. This can use the old config data before it * has been changed from the config. * @param string $old_vers * @param string $new_vers * @param I2CE_MagicDataNode $new_storage * @return boolean */ public function pre_upgrade($old_vers, $new_vers, $new_storage) { if (I2CE_Validate::checkVersion($old_vers, '<', '3.2.5')) { /** * In 3.2.3 some lists were moved to magicdata storage so we need to save * any old record ids for the old lists for later reference before any field * types get changed in magic data. */ if (!$this->pre_migrate()) { return false; } } return parent::pre_upgrade($old_vers, $new_vers, $new_storage); }
/** * Run the pre upgrade for this module. This can use the old config data before it * has been changed from the config. * @param string $old_vers * @param string $new_vers * @param I2CE_MagicDataNode $new_storage * @return boolean */ public function pre_upgrade($old_vers, $new_vers, $new_storage) { if (I2CE_Validate::checkVersion($old_vers, '<', '3.2.8')) { /** * In 3.2.3 some lists were moved to magicdata storage so we need to save * any old record ids for the old lists for later reference before any field * types get changed in magic data. */ if (!$this->pre_migrate()) { return false; } } elseif (I2CE_Validate::checkVersion($old_vers, '<', '3.2.9')) { /** * In 3.2.9 currency was updated so the benefit amount needs to be migrated. * This only needs to happen if the previous upgrade to 3.2.8 has * already happened. Otherwise that upgrade will include the currency info. */ if (!$this->pre_migrate329()) { return false; } } return parent::pre_upgrade($old_vers, $new_vers, $new_storage); }
/** * Do any pre upgrade actions if necessary. * @param string $old_vers * @param string $new_vers * @param I2CE_MagicDataNode $new_storage * @return boolean */ public function pre_upgrade($old_vers, $new_vers, $new_storage) { if (I2CE_Validate::checkVersion($old_vers, "<", "3.3.3")) { $migrate_path = "/I2CE/formsData/migrate_data/3.2.3"; I2CE_FormStorage::storeMigrateData(array("person" => array("home_country", "home_district", "home_county")), $migrate_path); } if (I2CE_Validate::checkVersion($old_vers, "<", "3.3.5")) { $migrate_path = "/I2CE/formsData/migrate_data/3.2.3"; I2CE_FormStorage::storeMigrateData(array("health_facility" => array("country", "district", "county", "facility_type", "facility_agent", "facility_status")), $migrate_path); } if (I2CE_Validate::checkVersion($old_vers, "<", "3.3.6")) { $migrate_path = "/I2CE/formsData/migrate_data/3.2.3"; I2CE_FormStorage::storeMigrateData(array("cadre" => array("qualification")), $migrate_path); I2CE_FormStorage::storeMigrateData(array("certificate" => array("academic_level")), $migrate_path); I2CE_FormStorage::storeMigrateData(array("deployment" => array("health_facility")), $migrate_path); I2CE_FormStorage::storeMigrateData(array("training_disruption_reason" => array("training_disruption_category")), $migrate_path); I2CE_FormStorage::storeMigrateData(array("training_disrupt" => array("disruption_reason")), $migrate_path); I2CE_FormStorage::storeMigrateData(array("disciplinary_action_reason" => array("disciplinary_action_category")), $migrate_path); I2CE_FormStorage::storeMigrateData(array("disciplinary_action" => array("disciplinary_action_category", "disciplinary_action_reason")), $migrate_path); I2CE_FormStorage::storeMigrateData(array("training_institution" => array("facility_agent", "facility_status", "country", "district", "county")), $migrate_path); I2CE_FormStorage::storeMigrateData(array("training_program" => array("cadre")), $migrate_path); I2CE_FormStorage::storeMigrateData(array("facility_institution" => array("health_facility", "training_institution")), $migrate_path); I2CE_FormStorage::storeMigrateData(array("demographic" => array("birth_country", "birth_district", "birth_county")), $migrate_path); I2CE_FormStorage::storeMigrateData(array("education" => array("academic_level", "certificate")), $migrate_path); I2CE_FormStorage::storeMigrateData(array("training" => array("training_institution", "cadre", "out_country")), $migrate_path); I2CE_FormStorage::storeMigrateData(array("exam" => array("try", "results")), $migrate_path); I2CE_FormStorage::storeMigrateData(array("registration" => array("practice_type")), $migrate_path); I2CE_FormStorage::storeMigrateData(array("out_migration" => array("country", "out_migration_reason")), $migrate_path); I2CE_FormStorage::storeMigrateData(array("private_practice" => array("health_facility")), $migrate_path); } return parent::pre_upgrade($old_vers, $new_vers, $new_storage); }
/** * Run the pre upgrade for this module. This can use the old config data before it has * been changed from the config * @param string $old_vers * @param string $new_vers * @param I2CE_MagicDataNode $new_storage * @return boolean */ public function pre_upgrade($old_vers, $new_vers, $new_storage) { if (I2CE_Validate::checkVersion($old_vers, '<', '4.1.8.0')) { if (!$this->pre_migrate()) { return false; } } return parent::pre_upgrade($old_vers, $new_vers, $new_storage); }
/** * Run the pre upgrade for this module. This can use the old config data before it * has been changed from the config. * @param string $old_vers * @param string $new_vers * @param I2CE_MagicDataNode $new_storage * @return boolean */ public function pre_upgrade($old_vers, $new_vers, $new_storage) { if (I2CE_Validate::checkVersion($old_vers, '<', '3.2.4')) { /** * In 3.2.3 some lists were moved to magicdata storage so we need to save * any old record ids for the old lists for later reference before any field * types get changed in magic data. */ if (!$this->pre_migrate()) { return false; } } elseif (I2CE_Validate::checkVersion($old_vers, '<', '3.2.6')) { /** * In 3.2.6 currency was upgraded so all currency fields also * need to be migrated if this module was previously upgrade to 3.2.4. */ if (!$this->pre_migrate326()) { return false; } } return parent::pre_upgrade($old_vers, $new_vers, $new_storage); }
/** * Run the pre upgrade for this module. This can use the old config data before it * has been changed from the config. * @param string $old_vers * @param string $new_vers * @param I2CE_MagicDataNode $new_storage * @return boolean */ public function pre_upgrade($old_vers, $new_vers, $new_storage) { if (I2CE_Validate::checkVersion($old_vers, '<', '3.2.3')) { /** * In 3.2.3 some lists were moved to magicdata storage so we need to save * any old record ids for the old lists for later reference before any field * types get changed in magic data. */ $migrate_path = "/I2CE/formsData/migrate_data/3.2.3"; I2CE_FormStorage::storeMigrateData(array("training_course" => array("training_institution", "training_funder", "continuing_education_course", "training_course_status", "training_course_category"), "person_scheduled_training_course" => array("training_course_evaluation", "training_course_requestor", "training_course", "scheduled_training_course"), "scheduled_training_course" => array("country", "district", "county")), $migrate_path); } return parent::pre_upgrade($old_vers, $new_vers, $new_storage); }