31 lines
805 B
PHP
31 lines
805 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
final class AssetManagementJournalAddExternalUser extends AbstractMigration
|
|
{
|
|
public function up(): void
|
|
{
|
|
if ($this->getEnvironment() == "thetool") {
|
|
$table = $this->table('AssetManagementJournal');
|
|
$table->addColumn('externalUser', 'string', [
|
|
'limit' => 255,
|
|
'null' => true,
|
|
'default' => null,
|
|
'after' => 'site',
|
|
]);
|
|
$table->update();
|
|
}
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
if ($this->getEnvironment() == "thetool") {
|
|
$table = $this->table('AssetManagementJournal');
|
|
$table->removeColumn('externalUser');
|
|
$table->update();
|
|
}
|
|
}
|
|
}
|