Update 20250627103000_asset_management_schema_v2.php
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user