. * * 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_Decimal extends CI_Migration { /** * Migration 002 -> 003 */ public function up() { $sql = "ALTER TABLE `tickets` CHANGE `quantite` `quantite` DECIMAL( 11 ) NOT NULL DEFAULT '0' COMMENT 'Incrément'"; return $this->db->query($sql); } /** * Retour 003 -> 002 */ public function down() { $sql = "ALTER TABLE `tickets` CHANGE `quantite` `quantite` INT( 11 ) NOT NULL DEFAULT '0' COMMENT 'Incrément'"; return $this->db->query($sql); } }