<?php

class m131220_124716_indexes_add extends MyDbMigration
{
	public function up()
	{
		try
		{
			$this->createIndex("Index_starttime_validatedby_gate_id", "storicotable", "StartTime, ValidatedBy, Gate, ID");
		}
		catch (Exception $e)
		{
		}
		
		try
		{
			$this->createIndex("Index_for_cedolino", "storicotable", "data_check_time, id_data_check_user, ValidatedBy, ID");
		}
		catch (Exception $e)
		{
		}
		
		try
		{
			$this->createIndex("Index_for_report", "storicotable", "ValidationTime, id_validate_user, validation_result, ValidatedBy, ID");
		}
		catch (Exception $e)
		{
		}
		
		try
		{
			$this->createIndex("Index_for_pending", "storicotable", "validation_result, ValidatedBy, ID");
		}
		catch (Exception $e)
		{
		}
	}

	public function down()
	{
		return true;
	}

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

	public function safeDown()
	{
	}
	*/
}