<?php
$_db_migration_to = '39.30'; // 8.13.36
if (!isset($migrations) || !is_object($migrations))
	die("This file cannot be executed directly");
$migrations->CheckValid($_db_migration_to);
//===========================================================================================



$migrations->Run('20231003_hd_issues_add_indexes.php', <<<'DB_UPDATE_FILE'
<?php

/**
 * BT-4285 open items component loading time optimizations
 *
 * @var \Claromentis\Setup\SetupFacade $migrations
 */
$db = $migrations->GetDb();

// Create indexes to improve loading time for open items component
$db->CreateIndex('hd_issue', 'idx_status_form_data_project_id', 'status', 'form_data_id', 'project_id');
$db->CreateIndex('hd_status_group_member', 'idx_group_id', 'group_id');

DB_UPDATE_FILE
);


//===========================================================================================
$migrations->SetVersion('39.30');
