Files
thetool/db/migrations/20240116132506_address_add_skonto.php
2024-01-16 16:46:16 +01:00

36 lines
1.0 KiB
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class AddressAddSkonto extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("Address");
$table->addColumn("fibu_supplier_skonto", "integer", ["null" => true, "default" => null, "after" => "fibu_supplier_due"]);
$table->addColumn("fibu_supplier_skonto_rate", "integer", ["null" => true, "default" => null, "after" => "fibu_supplier_skonto"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("Address");
$table->removeColumn("fibu_supplier_skonto_rate");
$table->removeColumn("fibu_supplier_skonto");
$table->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}