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



$migrations->Run('01_fb_field_data_unique_field_names_index.php', <<<'DB_UPDATE_FILE'
<?php
/** @var $migrations \Claromentis\Setup\SetupFacade */
$db = $migrations->GetDb();

$db->DropIndex('fb_field_data', 'fb_field_data_idx1');
$db->CreateUniqueIndex('fb_field_data', 'fb_field_data_idx1', 'form_data_id', 'field_sym_name');

DB_UPDATE_FILE
);


$migrations->Run('02_hd_issue_user_unique_followers.php', <<<'DB_UPDATE_FILE'
<?php
/** @var $migrations \Claromentis\Setup\SetupFacade */
$db = $migrations->GetDb();

$db->CreateUniqueIndex('hd_issue_user', 'hd_issue_user_unique_followers', 'issue_id', 'user_id');

DB_UPDATE_FILE
);


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