Files
thetool/db/migrations/20241210120000_warehouse_modify_6.php
2024-12-10 13:49:24 +01:00

32 lines
984 B
PHP

<?php /** @noinspection ALL */
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class WarehouseModify6 extends AbstractMigration {
public function up(): void {
if ($this->getEnvironment() == "thetool") {
// add articleNumber varchar 255 to the table WarehouseArticle
$WarehouseArticle = $this->table("WarehouseArticle", ["signed" => true]);
$WarehouseArticle->addColumn("articleNumber", "string", ["null" => false, "limit" => 255]);
$WarehouseArticle->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
public function down(): void {
if ($this->getEnvironment() == "thetool") {
$WarehouseArticle = $this->table("WarehouseArticle", ["signed" => true]);
$WarehouseArticle->removeColumn("articleNumber");
$WarehouseArticle->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}