added new preorderiframe
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php /** @noinspection ALL */
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class AddNewIndexesThetool extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$Preordercampaign = $this->table("Preordercampaign");
|
||||
$Preordercampaign->addColumn('iframe_origins', 'json', [
|
||||
'null' => true,
|
||||
'default' => null,
|
||||
'comment' => 'JSON array of allowed CORS origins for the IFrame, e.g., ["https://partner-a.com", "https://partner-b.de"]'
|
||||
]);
|
||||
$Preordercampaign->addColumn('iframe_consents', 'json', [
|
||||
'null' => true,
|
||||
'default' => null,
|
||||
'comment' => 'JSON array of consent information for the IFrame, e.g., [{url: "https://partner-a.com", text: "Partner A Consent", required: true, replace: "Consent"}, {url: "https://partner-b.de", text: "Partner B Consent", required: false, replace: "Consent"}]'
|
||||
]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$Preordercampaign = $this->table("Preordercampaign");
|
||||
$Preordercampaign->removeColumn('iframe_origins')
|
||||
->removeColumn('iframe_consents')
|
||||
->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user