Add PreorderCtag Migration
This commit is contained in:
35
db/migrations/20250805111210_preorder_ctag_add_extref.php
Normal file
35
db/migrations/20250805111210_preorder_ctag_add_extref.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class PreorderCtagAddExtref extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table("PreorderCtag");
|
||||
$table->addColumn("ext_id", "string", ["null" => true, "default" => null, "length" => 255, "after" => "service_type"]);
|
||||
$table->addColumn("ext_status", "string", ["null" => true, "default" => null, "length" => 255, "after" => "ext_id"]);
|
||||
$table->update();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$this->table("PreorderCtag")
|
||||
->removeColumn("ext_id")
|
||||
->removeColumn("ext_status")
|
||||
->update();
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user