Update 20250715110000_warehouse_offer_versioning.php
This commit is contained in:
@@ -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';");
|
||||||
|
|
||||||
@@ -156,4 +159,5 @@ final class WarehouseOfferVersioning extends AbstractMigration
|
|||||||
$this->table('WarehouseOfferClosingText')->drop()->save();
|
$this->table('WarehouseOfferClosingText')->drop()->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user