<?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 Version20220130083058 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 view ADD deal_id INT DEFAULT NULL, ADD time VARCHAR(100) DEFAULT NULL, CHANGE created_at created_at DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE view ADD CONSTRAINT FK_FEFDAB8EF60E2305 FOREIGN KEY (deal_id) REFERENCES deal (id)');
$this->addSql('CREATE INDEX IDX_FEFDAB8EF60E2305 ON view (deal_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE view DROP FOREIGN KEY FK_FEFDAB8EF60E2305');
$this->addSql('DROP INDEX IDX_FEFDAB8EF60E2305 ON view');
$this->addSql('ALTER TABLE view DROP deal_id, DROP time, CHANGE created_at created_at DATETIME NOT NULL');
}
}