<?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 Version20230313135950 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 survey_admin_status (id INT AUTO_INCREMENT NOT NULL, admin_status_id INT NOT NULL, survey_id INT NOT NULL, user_survey_status_id INT NOT NULL, label VARCHAR(255) NOT NULL, INDEX IDX_561A58B58200058F (admin_status_id), INDEX IDX_561A58B5B3FE509D (survey_id), INDEX IDX_561A58B5B3B4004D (user_survey_status_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE survey_admin_status ADD CONSTRAINT FK_561A58B58200058F FOREIGN KEY (admin_status_id) REFERENCES `admin_status` (id)');
$this->addSql('ALTER TABLE survey_admin_status ADD CONSTRAINT FK_561A58B5B3FE509D FOREIGN KEY (survey_id) REFERENCES survey (id)');
$this->addSql('ALTER TABLE survey_admin_status ADD CONSTRAINT FK_561A58B5B3B4004D FOREIGN KEY (user_survey_status_id) REFERENCES user_survey_status (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE survey_admin_status DROP FOREIGN KEY FK_561A58B58200058F');
$this->addSql('ALTER TABLE survey_admin_status DROP FOREIGN KEY FK_561A58B5B3FE509D');
$this->addSql('ALTER TABLE survey_admin_status DROP FOREIGN KEY FK_561A58B5B3B4004D');
$this->addSql('DROP TABLE survey_admin_status');
}
}