<?php

class m130313_215841_change_violation_code_foreign_key_in_eventsbehavior extends MyDbMigration
{
	public function up()
	{
    	$this->dropColumn('events_behavior', 'id_violation_code');
    
    	if ($this->dbConnection->schema->getTable('storicotable')->getColumn('custom_nationality') == null)
    		$this->addColumn('events_behavior', 'violation_code', 'string');
	}

	public function down()
	{
    $this->addColumn('events_behavior', 'id_violation_code', 'integer');
    $this->dropColumn('events_behavior', 'violation_code');
	}


}
