Update 20250627103000_asset_management_schema_v2.php

This commit is contained in:
Luca Haid
2025-07-22 14:10:36 +00:00
parent 1b61609a31
commit 34707728b7

View File

@@ -10,6 +10,7 @@ final class AssetManagementSchemaV2 extends AbstractMigration
*/
public function up(): void
{
if($this->getEnvironment() == "thetool") {
// 1. Add columns to AssetManagement table
$assetManagement = $this->table('AssetManagement');
$assetManagement
@@ -91,6 +92,7 @@ final class AssetManagementSchemaV2 extends AbstractMigration
])
->addIndex(['assetId'])
->create();
}
}
/**
@@ -98,6 +100,7 @@ final class AssetManagementSchemaV2 extends AbstractMigration
*/
public function down(): void
{
if($this->getEnvironment() == "thetool") {
// Remove columns from AssetManagement
$this->table('AssetManagement')
->removeColumn('imageId')
@@ -111,5 +114,6 @@ final class AssetManagementSchemaV2 extends AbstractMigration
// Drop reservation table
$this->table('AssetManagementReservation')->drop()->save();
}
}
}