Update 20250715110000_warehouse_offer_versioning.php

This commit is contained in:
Luca Haid
2025-07-22 14:07:25 +00:00
parent 4f8c0260ae
commit 158f6c4a8a
@@ -10,6 +10,7 @@ final class WarehouseOfferVersioning extends AbstractMigration
{ {
public function up(): void public function up(): void
{ {
if ($this->getEnvironment() == "thetool") {
// Use Phinx schema builder to create the WarehouseOfferClosingText table // Use Phinx schema builder to create the WarehouseOfferClosingText table
$this->table('WarehouseOfferClosingText', [ $this->table('WarehouseOfferClosingText', [
'id' => false, 'id' => false,
@@ -121,9 +122,11 @@ final class WarehouseOfferVersioning extends AbstractMigration
WHERE wh.`table` = 'WarehouseOffer' AND wh.new_value = 1 AND wh.note = 'Baseline Version 1 erstellt durch Migration.'; WHERE wh.`table` = 'WarehouseOffer' AND wh.new_value = 1 AND wh.note = 'Baseline Version 1 erstellt durch Migration.';
"); ");
} }
}
public function down(): void public function down(): void
{ {
if ($this->getEnvironment() == "thetool") {
// Clean up the history created by this migration // Clean up the history created by this migration
$this->execute("DELETE FROM `WarehouseHistory` WHERE `note` = 'Baseline Version 1 erstellt durch Migration.' AND `table` = 'WarehouseOffer';"); $this->execute("DELETE FROM `WarehouseHistory` WHERE `note` = 'Baseline Version 1 erstellt durch Migration.' AND `table` = 'WarehouseOffer';");
@@ -157,3 +160,4 @@ final class WarehouseOfferVersioning extends AbstractMigration
} }
} }
} }
}