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



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

// For a brief time creating columns as "BOOL DEFAULT 1" would be saved as default 0 instead.
// This will fix any columns effected by that

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

$db->AlterColumn('hpl_days', 'user_comment_mandatory', 'user_comment_mandatory', 'BOOL NOT_NULL DEFAULT 1');
$db->AlterColumn('users', 'pp_default', 'pp_default', 'BOOL NOT_NULL DEFAULT 1');
DB_UPDATE_FILE
);


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