<?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 Version20220621142101 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('DROP TABLE annotationobjects_images');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE annotationobjects_images (annotationobject_id INT NOT NULL, image_id INT NOT NULL, INDEX IDX_25D9FF9B8688C954 (annotationobject_id), INDEX IDX_25D9FF9B3DA5256D (image_id), PRIMARY KEY(annotationobject_id, image_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE annotationobjects_images ADD CONSTRAINT FK_25D9FF9B3DA5256D FOREIGN KEY (image_id) REFERENCES image (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE annotationobjects_images ADD CONSTRAINT FK_25D9FF9B8688C954 FOREIGN KEY (annotationobject_id) REFERENCES annotationobject (id) ON DELETE CASCADE');
}
}