src/Migrations/Version20210415201957.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 Version20210415201957 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('ALTER TABLE contacts DROP owner_type, DROP owner_id');$this->addSql('ALTER TABLE files DROP owner_type, DROP owner_id');$this->addSql('ALTER TABLE forum_thread DROP owner_type, DROP owner_id');$this->addSql('DROP INDEX idx_relation ON links');$this->addSql('ALTER TABLE links DROP owner_type, DROP owner_id');$this->addSql('CREATE INDEX idx_relation ON links (owner_uuid, deleted)');$this->addSql('ALTER TABLE material DROP owner_type, DROP owner_id');$this->addSql('ALTER TABLE news DROP owner_type, DROP owner_id');$this->addSql('ALTER TABLE reviews DROP owner_type, DROP owner_id');}public function down(Schema $schema): void{// this down() migration is auto-generated, please modify it to your needs$this->addSql('ALTER TABLE contacts ADD owner_type VARCHAR(50) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD owner_id INT DEFAULT NULL');$this->addSql('ALTER TABLE files ADD owner_type VARCHAR(50) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD owner_id INT DEFAULT NULL');$this->addSql('ALTER TABLE forum_thread ADD owner_type VARCHAR(50) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD owner_id INT DEFAULT NULL');$this->addSql('DROP INDEX idx_relation ON links');$this->addSql('ALTER TABLE links ADD owner_type VARCHAR(50) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD owner_id INT DEFAULT NULL');$this->addSql('CREATE INDEX idx_relation ON links (owner_type, owner_id, deleted)');$this->addSql('ALTER TABLE material ADD owner_type VARCHAR(50) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD owner_id INT DEFAULT NULL');$this->addSql('ALTER TABLE news ADD owner_type VARCHAR(50) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD owner_id INT DEFAULT NULL');$this->addSql('ALTER TABLE reviews ADD owner_type VARCHAR(50) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD owner_id INT DEFAULT NULL');}}