<?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 Version20221201091439 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('CREATE TABLE user_notification_setting (id INT AUTO_INCREMENT NOT NULL, `channel` LONGTEXT NOT NULL COMMENT \'(DC2Type:simple_array)\', `event` VARCHAR(255) NOT NULL COMMENT \'(DC2Type:user_notification_setting_event)\', `create_user` VARCHAR(50) NOT NULL, `creation_date` DATETIME NOT NULL, `modified_user` VARCHAR(50) DEFAULT NULL, `modified_date` DATETIME DEFAULT NULL, `user_setting_id` INT DEFAULT NULL, INDEX IDX_344BE150DEFF8F0B (`user_setting_id`), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE user_notification_setting ADD CONSTRAINT FK_344BE150DEFF8F0B FOREIGN KEY (`user_setting_id`) REFERENCES user_setting (`id`) ON DELETE CASCADE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE user_notification_setting');
}
}