32 lines
984 B
PHP
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") {
|
|
|
|
}
|
|
}
|
|
}
|