<?php

class m140930_073045_add_is_whitelist_to_gate_behavior extends MyDbMigration
{
	public function up()
	{
	  if ($this->dbConnection->schema->getTable('gate_behavior')->getColumn('is_whitelist') == null)
	    $this->addColumn('gate_behavior', 'is_whitelist', 'boolean  DEFAULT 0');
	}

	public function down()
	{
		if ($this->dbConnection->schema->getTable('gate_behavior')->getColumn('is_whitelist') != null)
      $this->dropColumn('gate_behavior', 'is_whitelist');
		return true;
	}

	/*
	// Use safeUp/safeDown to do migration with transaction
	public function safeUp()
	{
	}

	public function safeDown()
	{
	}
	*/
}