<?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 Version20220419132438 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 oferta ADD CONSTRAINT FK_7479C8F29A6DA626 FOREIGN KEY (idProspect) REFERENCES prospect (id)');
$this->addSql('ALTER TABLE oferta ADD CONSTRAINT FK_7479C8F2268B9C9D FOREIGN KEY (agent) REFERENCES `user` (id)');
$this->addSql('CREATE INDEX IDX_7479C8F29A6DA626 ON oferta (idProspect)');
$this->addSql('CREATE INDEX IDX_7479C8F2268B9C9D ON oferta (agent)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE oferta DROP FOREIGN KEY FK_7479C8F29A6DA626');
$this->addSql('ALTER TABLE oferta DROP FOREIGN KEY FK_7479C8F2268B9C9D');
$this->addSql('DROP INDEX IDX_7479C8F29A6DA626 ON oferta');
$this->addSql('DROP INDEX IDX_7479C8F2268B9C9D ON oferta');
}
}