Addded cifurl and -cable url to Preordercampaign

This commit is contained in:
Frank Schubert
2024-02-23 16:37:12 +01:00
parent ec1d6f803c
commit 8fbea5f824
7 changed files with 122 additions and 7 deletions
@@ -0,0 +1,36 @@
<?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") {
}
}
}