Rev 2427 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php// declare(encoding='UTF-8');/*** Mise à jour de la base de données afin de l'optimiser :* - remplacement du champ "eflore_publiable" de la table "cel_images" par un champ "transmission" (correspondant au champ tansmission des obs)* - ajout du champ "date_liaison" dans la table "cel_images"* - ajout du champ "ce_observation" dans la table "cel_images"* - migration des données de la table cel_obs_images dans cel_images* - création d'un index sur cel_images.ce_observation* - suppression de la table cel_obs_images** Utilisation :* - mise à jour de la bdd : <code>/opt/lamp/bin/php cli.php migration_optimisation -a migrer</code>** @category CEL* @package Scripts* @subpackage Migration : Optimisation* @author Mathias CHOUET <mathias@tela-botanica.org>* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>* @author Aurelien PERONNET <aurelien@tela-botanica.org>* @license GPL v3 <http://www.gnu.org/licenses/gpl.txt>* @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>* @copyright 1999-2014 Tela Botanica <accueil@tela-botanica.org>*/class MigrationOptimisation extends CelScript {public function executer() {try {$this->initialiserProjet('migration_optimisation');// Lancement de l'action demandée$cmd = $this->getParametre('a');switch ($cmd) {case 'maj' :$script = $this->chargerClasse('MajOptimisation');$script->executer();break;default :throw new Exception("Erreur : la commande '$cmd' n'existe pas!");}} catch (Exception $e) {$this->traiterErreur($e->getMessage());}}private function chargerClasse($classe) {require_once $classe.'.php';$conteneur = new Conteneur($this->parametres);return new $classe($conteneur);}}