Files
thetool/db/migrations/20231103123714_preorder_add_cif_token.php
2023-11-07 13:00:29 +01:00

36 lines
991 B
PHP

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