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



$migrations->Run('20241030_projects_admin_dmsv_configuration.php', <<<'DB_UPDATE_FILE'
<?php

/**
 * PRJ-628
 *
 * Adds four new records to the `variables` table.
 *
 * These records store configuration options for the DMSV component in the Projects Module.
 */

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

$logger->notice('Adding four new variable records: `projects_files_dmsv_action`, `projects_files_dmsv_view_style`, `projects_files_dmsv_detailed_upload`, `projects_files_dmsv_new_window`');

$database = $migrations->GetDb();

$database->query("INSERT INTO variables VALUES ('projects_files_dmsv_action', 'preview')");
$database->query("INSERT INTO variables VALUES ('projects_files_dmsv_view_style', 'icons')");
$database->query("INSERT INTO variables VALUES ('projects_files_dmsv_detailed_upload', 0)");
$database->query("INSERT INTO variables VALUES ('projects_files_dmsv_new_window', 0)");

$logger->notice('Finished adding the four new records.');

DB_UPDATE_FILE
);


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