added stuff to manualinvoice
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class AddLockExportedToManualinvoice extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table("ManualInvoice");
|
||||
|
||||
$table->addColumn("lock", "integer", [
|
||||
"null" => false,
|
||||
"default" => 0,
|
||||
"limit" => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY,
|
||||
"after" => "status"
|
||||
]);
|
||||
|
||||
$table->addColumn("exported", "integer", [
|
||||
"null" => false,
|
||||
"default" => 0,
|
||||
"limit" => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY,
|
||||
"after" => "lock"
|
||||
]);
|
||||
|
||||
$table->save();
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table("ManualInvoice");
|
||||
$table->removeColumn("lock")->save();
|
||||
$table->removeColumn("exported")->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user