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



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

$db = $migrations->GetDb();

$table_descr = array(
	'id' => 'IDENTITY',
	'metadatafile_id'	=>	"INT NOT_NULL",
	'refcount'	=>	"INT NOT_NULL DEFAULT 0",
);
$db->CreateTable('hd_bbcode_attachment', $table_descr, true);
DB_UPDATE_FILE
);


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

$db->AddColumn('hd_project', 'from_address', 'VARCHAR(255)');
DB_UPDATE_FILE
);


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