<?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 Version20220322074019 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 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 = 'customer.app.created'
WHERE user.manufacturer_id is null
AND user.customer_id is null
AND user.is_active = 1
");
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
}
}