<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20221114140012 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql("INSERT IGNORE INTO event(code)
VALUES
('inquiry.customs_not_added')
");
$this->addSql("
INSERT INTO subscription_settings(user_id, event_id, type, own, _all, selected, no)
SELECT user.id, e.id, 'subscription.setting.type.all', false, false, false, true
FROM user
INNER JOIN event AS e
ON e.code = 'inquiry.customs_not_added'
WHERE user.manufacturer_id is null
AND user.customer_id is null
AND user.is_active = 1
");
}
public function down(Schema $schema): void
{
}
}