src/Migrations/Version20211008052200.php line 1
<?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 Version20211008052200 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 gallery_video ADD preview_id INT NOT NULL');
$this->addSql('ALTER TABLE gallery_video ADD CONSTRAINT FK_985A0A0FCDE46FDB FOREIGN KEY (preview_id) REFERENCES files (id)');
$this->addSql('CREATE INDEX IDX_985A0A0FCDE46FDB ON gallery_video (preview_id)');
$this->addSql('ALTER TABLE olymp_online_direction ADD t_as_from DATETIME DEFAULT NULL, ADD t_as_to DATETIME DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE gallery_video DROP FOREIGN KEY FK_985A0A0FCDE46FDB');
$this->addSql('DROP INDEX IDX_985A0A0FCDE46FDB ON gallery_video');
$this->addSql('ALTER TABLE gallery_video DROP preview_id');
$this->addSql('ALTER TABLE olymp_online_direction DROP t_as_from, DROP t_as_to');
}
}