2012-07-13 17:06:09 +00:00
|
|
|
<?php
|
|
|
|
|
|
2012-07-25 14:59:13 +00:00
|
|
|
class m120725_101018_tbl_estados_candidatos extends CDbMigration
|
2012-07-13 17:06:09 +00:00
|
|
|
{
|
|
|
|
|
public function up()
|
|
|
|
|
{
|
2012-07-25 14:59:13 +00:00
|
|
|
$this->createTable('tbl_estados_candidatos', array(
|
2012-07-13 17:06:09 +00:00
|
|
|
'id' => 'pk',
|
|
|
|
|
'descripcion' => 'string NOT NULL',
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
$this->dropColumn('tbl_candidatos', 'estado');
|
2012-07-25 14:59:13 +00:00
|
|
|
$this->addColumn('tbl_candidatos', 'id_estado', 'integer');
|
2012-07-13 17:06:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function down()
|
2012-07-25 14:59:13 +00:00
|
|
|
{
|
|
|
|
|
$this->dropTable('tbl_estados_candidatos');
|
2012-07-13 17:06:09 +00:00
|
|
|
$this->dropColumn('tbl_candidatos', 'id_estado');
|
2012-07-25 14:59:13 +00:00
|
|
|
$this->addColumn('tbl_candidatos', 'estado', 'string');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
// Use safeUp/safeDown to do migration with transaction
|
|
|
|
|
public function safeUp()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function safeDown()
|
|
|
|
|
{
|
2012-07-13 17:06:09 +00:00
|
|
|
}
|
2012-07-25 14:59:13 +00:00
|
|
|
*/
|
2012-07-13 17:06:09 +00:00
|
|
|
}
|