<?php

class m130617_162709_spotspeed_articlewizard extends MyDbMigration
{
	public function up()
	{
		$this->addColumn('violation_codes', 'description', 'text');
		
		$this->createNonExistingTable('spotspeed_article_wizard',
				array('id' => 'pk',
						'original_vehicle_class' => 'varchar(255)',
						'custom_vehicle_class'   => 'varchar(255)',
						'custom_property_type'      => 'varchar(255)',
						'begin_time'					   => 'time',
						'end_time'					     => 'time',
						'delta_speed_min'				 => 'int',
						'delta_speed_max'				 => 'int',
						'id_violation_code'      => 'int',
						
				),
				'ENGINE=MyISAM'
		);
	}

	public function down()
	{
		
		$this->dropColumn('violation_codes', 'description');
		$this->dropTable('spotspeed_article_wizard', 'description');
		
		return true;
	}

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

	public function safeDown()
	{
	}
	*/
}
