<?php

class m141021_065934_add_xy_to_gatetable extends MyDbMigration
{
	public function up()
	{
	  if ($this->dbConnection->schema->getTable('gatetable')->getColumn('mapx') == null)
	    $this->addColumn('gatetable', 'mapx', 'string');
	  if ($this->dbConnection->schema->getTable('gatetable')->getColumn('mapy') == null)
	    $this->addColumn('gatetable', 'mapy', 'string');
	}

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