<?php

class m131105_094231_traffic_flow_alarms extends MyDbMigration
{
	public function up()
	{
		return true;
		
		$this->execute(
				'INSERT INTO behavior (name, tag, epoch, alarm_tag_name) VALUES
				("slowtrafficalarm", "SlowTrafficAlarm", "2013-11-05 00:00:00", "slow traffic"),
				("stationarytrafficalarm", "StationaryTrafficAlarm", "2013-11-05 00:00:00", "stationary traffic"),
				("nowtrafficalarm", "NoTrafficAlarm", "2013-11-05 00:00:00", "no traffic");'
		);
				
	}

	public function down()
	{
		$this->delete('behavior', 'tag=:tag', array('tag' => 'SlowTrafficAlarm'));
		$this->delete('behavior', 'tag=:tag', array('tag' => 'StationaryTrafficAlarm'));
		$this->delete('behavior', 'tag=:tag', array('tag' => 'NoTrafficAlarm'));
		
		return true;
	}

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

	public function safeDown()
	{
	}
	*/
}