Asset management/add external text field

This commit is contained in:
Luca Haid
2025-07-11 08:55:11 +00:00
parent 42adbdbc67
commit fb7a373ea3
4 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<?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();
}
}
}