48 lines
2.1 KiB
PHP
48 lines
2.1 KiB
PHP
<?php /** @noinspection ALL */
|
|
declare(strict_types=1);
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
final class WarehouseModify2 extends AbstractMigration {
|
|
public function up(): void {
|
|
if ($this->getEnvironment() == "thetool") {
|
|
//WarehouseShippingNote Table
|
|
$WarehouseShippingNote = $this->table("WarehouseShippingNote", ["signed" => true]);
|
|
$WarehouseShippingNote->addColumn("deliveryAddressEMail", "string", ["null" => false, "limit" => 255]);
|
|
$WarehouseShippingNote->addColumn("note", "string", ["null" => false, "limit" => 255]);
|
|
$WarehouseShippingNote->addColumn("hoursEntries", "string", ["null" => false, "limit" => 255]);
|
|
$WarehouseShippingNote->addColumn("signature", "text", ["null" => true]);
|
|
$WarehouseShippingNote->addColumn("signatureName", "text", ["null" => true]);
|
|
$WarehouseShippingNote->addColumn("signatureDate", "text", ["null" => true]);
|
|
$WarehouseShippingNote->save();
|
|
|
|
//WarehouseArticle Table
|
|
$WarehouseArticle = $this->table("WarehouseArticle", ["signed" => true]);
|
|
$WarehouseArticle->changeColumn("cheapestSellPrice", "text", ["null" => true]);
|
|
$WarehouseArticle->save();
|
|
}
|
|
|
|
if ($this->getEnvironment() == "addressdb") {
|
|
|
|
}
|
|
}
|
|
|
|
public function down(): void {
|
|
if ($this->getEnvironment() == "thetool") {
|
|
$this->table("WarehouseShippingNote")->removeColumn("deliveryAddressEMail");
|
|
$this->table("WarehouseShippingNote")->removeColumn("note");
|
|
$this->table("WarehouseShippingNote")->removeColumn("hoursEntries");
|
|
$this->table("WarehouseShippingNote")->removeColumn("signature");
|
|
$this->table("WarehouseShippingNote")->removeColumn("signatureName");
|
|
$this->table("WarehouseShippingNote")->removeColumn("signatureDate");
|
|
$this->table("WarehouseShippingNote")->save();
|
|
|
|
$this->table("WarehouseArticle")->changeColumn("cheapestSellPrice", "string", ["null" => false, "limit" => 255]);
|
|
}
|
|
|
|
if ($this->getEnvironment() == "addressdb") {
|
|
|
|
}
|
|
}
|
|
}
|