updated rimotype map

This commit is contained in:
2025-09-17 13:23:03 +02:00
parent 7614fead8f
commit 7a71c9fdd8
14 changed files with 1258 additions and 425 deletions
@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class AdbAddFcpIndex extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == 'addressdb')
{
$this->execute("ALTER TABLE `RimoFcp` ADD INDEX `idx_name` (`name`);");
}
}
public function down(): void
{
if ($this->getEnvironment() == 'addressdb') {
$this->execute("ALTER TABLE `RimoFcp` DROP INDEX `idx_name`;");
}
}
}
@@ -0,0 +1,27 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class ModifyPreordercampaign extends AbstractMigration {
public function up(): void {
if ($this->getEnvironment() !== 'thetool') return;
$sql = <<<SQL
ALTER TABLE `Preordercampaign`
ADD COLUMN `rimo_type_map_faults` JSON DEFAULT NULL AFTER `banned_rimo_fcp`,
MODIFY COLUMN `iframe_origins` LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'Allowed IFrame CORS origins' CHECK (json_valid(`iframe_origins`)),
MODIFY COLUMN `iframe_consents` LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'IFrame consent configurations' CHECK (json_valid(`iframe_consents`));
SQL;
$this->execute($sql);
}
public function down(): void {
if ($this->getEnvironment() !== 'thetool') return;
$this->table('Preordercampaign')
->removeColumn('rimo_type_map_faults')
->save();
}
}