<?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 Version20220615081424 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 comenzi CHANGE id_oferta idOferta INT DEFAULT NULL');
$this->addSql('ALTER TABLE comenzi ADD CONSTRAINT FK_103D2EEE17686068 FOREIGN KEY (idOferta) REFERENCES oferta (id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_103D2EEE17686068 ON comenzi (idOferta)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE comenzi DROP FOREIGN KEY FK_103D2EEE17686068');
$this->addSql('DROP INDEX UNIQ_103D2EEE17686068 ON comenzi');
$this->addSql('ALTER TABLE comenzi CHANGE idoferta id_oferta INT DEFAULT NULL');
}
}