<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
final class Version20220203160712 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 mallette_file_notification_app_user (mallette_file_notification_id INT NOT NULL, app_user_id INT NOT NULL, INDEX IDX_7B3A1A86990EB3A1 (mallette_file_notification_id), INDEX IDX_7B3A1A864A3353D8 (app_user_id), PRIMARY KEY(mallette_file_notification_id, app_user_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE mallette_file_notification_app_user ADD CONSTRAINT FK_7B3A1A86990EB3A1 FOREIGN KEY (mallette_file_notification_id) REFERENCES mallette_file_notification (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE mallette_file_notification_app_user ADD CONSTRAINT FK_7B3A1A864A3353D8 FOREIGN KEY (app_user_id) REFERENCES eckinox_app_users (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 mallette_file_notification_app_user');
$this->addSql('ALTER TABLE mallette_file_notification CHANGE status status VARCHAR(255) NOT NULL COLLATE `utf8mb4_unicode_ci`');
}
public function isTransactional(): bool
{
return false;
}
}