Added skip options to mailtemplates in Preordercampaigns
This commit is contained in:
+39
@@ -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") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user