migrations/Version20220822134216.php line 1
<?phpdeclare(strict_types=1);namespace DoctrineMigrations;use Doctrine\DBAL\Schema\Schema;use Doctrine\Migrations\AbstractMigration;/*** Auto-generated Migration: Please modify to your needs!*/final class Version20220822134216 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 presentation_content (id INT NOT NULL, resource_id INT DEFAULT NULL, PRIMARY KEY(id))');$this->addSql('CREATE UNIQUE INDEX UNIQ_63B670F089329D25 ON presentation_content (resource_id)');$this->addSql('CREATE TABLE spreadsheet_content (id INT NOT NULL, resource_id INT DEFAULT NULL, PRIMARY KEY(id))');$this->addSql('CREATE UNIQUE INDEX UNIQ_2811893289329D25 ON spreadsheet_content (resource_id)');$this->addSql('ALTER TABLE presentation_content ADD CONSTRAINT FK_63B670F089329D25 FOREIGN KEY (resource_id) REFERENCES resource (id) NOT DEFERRABLE INITIALLY IMMEDIATE');$this->addSql('ALTER TABLE presentation_content ADD CONSTRAINT FK_63B670F0BF396750 FOREIGN KEY (id) REFERENCES primitive (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');$this->addSql('ALTER TABLE spreadsheet_content ADD CONSTRAINT FK_2811893289329D25 FOREIGN KEY (resource_id) REFERENCES resource (id) NOT DEFERRABLE INITIALLY IMMEDIATE');$this->addSql('ALTER TABLE spreadsheet_content ADD CONSTRAINT FK_28118932BF396750 FOREIGN KEY (id) REFERENCES primitive (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');}public function down(Schema $schema): void{// this down() migration is auto-generated, please modify it to your needs$this->addSql('DROP TABLE presentation_content');$this->addSql('DROP TABLE spreadsheet_content');}}