<?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 Version20231019080414 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 image (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, place_id INTEGER DEFAULT NULL, playable_entity_id INTEGER DEFAULT NULL, place_description_id INTEGER DEFAULT NULL, playable_entity_description_id INTEGER DEFAULT NULL, name VARCHAR(255) NOT NULL, CONSTRAINT FK_C53D045FDA6A219 FOREIGN KEY (place_id) REFERENCES place_description (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_C53D045FF31C1B00 FOREIGN KEY (playable_entity_id) REFERENCES playable_entity_description (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_C53D045F2699A047 FOREIGN KEY (place_description_id) REFERENCES place_description (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_C53D045F540E34D4 FOREIGN KEY (playable_entity_description_id) REFERENCES playable_entity_description (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_C53D045FDA6A219 ON image (place_id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_C53D045FF31C1B00 ON image (playable_entity_id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_C53D045F2699A047 ON image (place_description_id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_C53D045F540E34D4 ON image (playable_entity_description_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE image');
}
}