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



$migrations->Run('01_site_copy_db_cleanup.php', <<<'DB_UPDATE_FILE'
<?php

// Testing started on this feature branch before it was ready and some invalid DB records got onto the test servers

/** @var \Claromentis\Setup\SetupFacade $migrations */
$db = $migrations->GetDb();

$db->query('DELETE FROM pages_url WHERE active_page_id IS NULL');
$db->query('DELETE FROM pages_site WHERE url_id = 0');

DB_UPDATE_FILE
);


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