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



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

// drop index `pages_site_title`
$db->DropIndex('pages_site', 'pages_site_title');

// create index limited to 100 characters
$db->CreateIndex('pages_site', 'pages_site_title', 'title(100)');

DB_UPDATE_FILE
);


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