. * * Script de migration de la base */ if (!defined('BASEPATH')) exit ('No direct script access allowed'); /** * Ajout d'un champ vol a la table ticket * * @author frederic * */ class Migration_Tickets_Bug1661 extends CI_Migration { /** * Migration 004 -> 005 */ public function up() { $sql = "ALTER TABLE `tickets` CHANGE `description` `description` VARCHAR( 120 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT 'Commentaire'"; $result = $this->db->query($sql); $sql = "ALTER TABLE `tickets` CHANGE `type` `type` INT( 11 ) NOT NULL DEFAULT '0' COMMENT 'Type de ticket'"; $result &= $this->db->query($sql); return $result; } /** * Retour 005 -> 004 */ public function down() { $sql = "ALTER TABLE `tickets` CHANGE `description` `description` VARCHAR( 120 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'Commentaire'"; $result = $this->db->query($sql); return $result; } }