added 2 new columns to historicbill
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class HistoricbillModify extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table("HistoricBill");
|
||||
|
||||
$table->addColumn("brutto_sum", "decimal", ["null" => true, "precision" => 10, "scale" => 4])
|
||||
->update();
|
||||
|
||||
$table->addColumn("fibu_number", "string", ["null" => true, "limit" => 255])
|
||||
->update();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table("HistoricBill");
|
||||
$table->removeColumn("brutto_sum")
|
||||
->update();
|
||||
$table->removeColumn("fibu_number")
|
||||
->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user