<?php

class m150220_073602_add_gate_groups_orderIndex extends CDbMigration
{
 public function up()
  {
    if ($this->dbConnection->schema->getTable('gate_group')->getColumn('orderIndex') == null)
      $this->addColumn('gate_group', 'orderIndex', 'int');
  }

  public function down()
  {
    if ($this->dbConnection->schema->getTable('gate_group')->getColumn('orderIndex') != null)
      $this->dropColumn('gate_group', 'orderIndex');

    return true;
  }
}