Added skip options to mailtemplates in Preordercampaigns

This commit is contained in:
Frank Schubert
2025-02-03 15:01:04 +01:00
parent 5762f01d3f
commit 4f5502f183
5 changed files with 121 additions and 19 deletions
@@ -0,0 +1,39 @@
<?php
declare(strict_types=1);
use Phinx\Db\Adapter\MysqlAdapter;
use Phinx\Migration\AbstractMigration;
final class PreordercampaignStatusnotificationMailtemplateAddSkipActions extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("PreordercampaignStatusnotificationMailtemplate");
$table->addColumn("allow_on_skip", "integer", ["null" => false, "default" => 1, "length" => MySqlAdapter::INT_TINY, "after" => "mailtemplate_id"]);
$table->addColumn("prevent_previous", "integer", ["null" => false, "default" => 0, "length" => MySqlAdapter::INT_TINY, "after" => "allow_on_skip"]);
$table->changeColumn("mailtemplate_id", "integer", ["null" => true, "default" => null]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("PreordercampaignStatusnotificationMailtemplate")
->removeColumn("allow_on_skip")
->removeColumn("prevent_previous")
->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
}