<?php

class m131111_072531_indexes_for_statistics extends MyDbMigration
{
	public function up()
	{
		try {
		
			$this->createIndex('Index_time_gate_class_counter', 'statstable', 'StartDateTime, EndDateTime, Gate, Classe, Counter');
				
		} catch (Exception $e) {
		}
		
		try {
		
			$this->createIndex('Index_class_time_gate_counter', 'statstable', 'Classe, StartDateTime, EndDateTime, Gate, Counter');
		
		} catch (Exception $e) {
		}
		
	}

	public function down()
	{
		$this->dropIndex('Index_time_gate_class_counter', 'statstable');
    $this->dropIndex('Index_class_time_gate_counter', 'statstable');
    
		return true;
	}

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

	public function safeDown()
	{
	}
	*/
}