diff --git a/db/migrations/20260126120000_warehousearticle_rename_revenueaccount_to_vatgroupid.php b/db/migrations/20260126120000_warehousearticle_rename_revenueaccount_to_vatgroupid.php index 0ab388300..0b1933697 100644 --- a/db/migrations/20260126120000_warehousearticle_rename_revenueaccount_to_vatgroupid.php +++ b/db/migrations/20260126120000_warehousearticle_rename_revenueaccount_to_vatgroupid.php @@ -8,9 +8,9 @@ final class WarehousearticleRenameRevenueaccountToVatgroupid extends AbstractMig public function up(): void { if($this->getEnvironment() == "thetool") { - $this->execute("ALTER TABLE warehousearticle CHANGE revenueAccount vatgroup_id INT(11) NOT NULL DEFAULT 2"); + $this->execute("ALTER TABLE WarehouseArticle CHANGE revenueAccount vatgroup_id INT(11) NOT NULL DEFAULT 2"); - $this->execute("UPDATE warehousearticle SET vatgroup_id = CASE + $this->execute("UPDATE WarehouseArticle SET vatgroup_id = CASE WHEN vatgroup_id = 0 THEN 2 WHEN vatgroup_id = 1 THEN 3 ELSE vatgroup_id @@ -21,13 +21,13 @@ final class WarehousearticleRenameRevenueaccountToVatgroupid extends AbstractMig public function down(): void { if($this->getEnvironment() == "thetool") { - $this->execute("UPDATE warehousearticle SET vatgroup_id = CASE + $this->execute("UPDATE WarehouseArticle SET vatgroup_id = CASE WHEN vatgroup_id = 2 THEN 0 WHEN vatgroup_id = 3 THEN 1 ELSE vatgroup_id END"); - $this->execute("ALTER TABLE warehousearticle CHANGE vatgroup_id revenueAccount INT(11) NOT NULL DEFAULT 0"); + $this->execute("ALTER TABLE WarehouseArticle CHANGE vatgroup_id revenueAccount INT(11) NOT NULL DEFAULT 0"); } } }