36 lines
991 B
PHP
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") {
|
|
|
|
}
|
|
}
|
|
}
|