<?php

class m200304_164437_salvar_id_modulo_mobile_cliente extends CDbMigration
{
	public function up()
	{
		$table = Yii::app()->db->schema->getTable('clientes');
		if(!isset($table->columns['CLI_IDMODULO_MOBILE'])) {
			$this->addColumn('clientes', 'CLI_IDMODULO_MOBILE', 'INT(11) NULL default NULL');
			$this->refreshTableSchema('clientes');
		}
	}

	public function down()
	{
		$table = Yii::app()->db->schema->getTable('clientes');
		if(isset($table->columns['CLI_IDMODULO_MOBILE'])) {
			$this->dropColumn('clientes', 'CLI_IDMODULO_MOBILE');
			$this->refreshTableSchema('clientes');
		}
	}
}