Files
thetool/db/migrations/20240223140814_preordercampaign_add_cif_urls.php
2024-02-23 16:37:12 +01:00

37 lines
1.0 KiB
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class PreordercampaignAddCifUrls extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("Preordercampaign");
$table->addColumn("cifurl", "string", ["null" => true, "default" => null, "limit" => 255, "after" => "allow_unit_update"]);
$table->addColumn("cifcableurl", "string", ["null" => true, "default" => null, "limit" => 255, "after" => "cifurl"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("Preordercampaign");
$table->removeColumn("cifcableurl");
$table->removeColumn("cifurl");
$table->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}