<?php

class m151015_123426_add_indexes_in_storicotable extends MyDbMigration
{
	public function up()
	{
		$this->createIndex('index_for_report',   'storicotable', 'ValidationTime, id_validate_user, validation_result, ValidatedBy, ID');
		
		$this->createIndex('index_for_cedolino', 'storicotable', 'data_check_time, id_data_check_user, ValidatedBy, ID');
		
		$this->createIndex('index_for_pending',  'storicotable','validation_result, ValidatedBy, ID');
		
		$this->createIndex('index_approved_not_exported',  'storicotable', 'ValidationTime, id_validate_user, ext_code, validation_result, ValidatedBy, ID');
	}

	public function down()
	{
		echo "m151015_123426_add_indexes_in_storicotable does not support migration down.\n";
		
	   $this->dropIndex('index_for_report', 'storicotable');
	   $this->dropIndex('index_for_cedolino', 'storicotable');
	   $this->dropIndex('index_for_pending', 'storicotable');
	   $this->dropIndex('index_approved_not_exported', 'storicotable');
		
		
		return false;
	}

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

	public function safeDown()
	{
	}
	*/
}