Files
thetool/db/migrations/20240118193741_productgroup_add_matchcodeorigin.php
2024-01-18 22:02:43 +01:00

32 lines
809 B
PHP

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