<?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 Version20220419130557 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 sarcini DROP FOREIGN KEY FK_A1D34D0FC3ADF082');
$this->addSql('DROP INDEX IDX_A1D34D0FC3ADF082 ON sarcini');
$this->addSql('ALTER TABLE sarcini CHANGE responsabil_id_id responsabil_id INT NOT NULL');
$this->addSql('ALTER TABLE sarcini ADD CONSTRAINT FK_A1D34D0FE62D5D88 FOREIGN KEY (responsabil_id) REFERENCES `user` (id)');
$this->addSql('CREATE INDEX IDX_A1D34D0FE62D5D88 ON sarcini (responsabil_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE sarcini DROP FOREIGN KEY FK_A1D34D0FE62D5D88');
$this->addSql('DROP INDEX IDX_A1D34D0FE62D5D88 ON sarcini');
$this->addSql('ALTER TABLE sarcini CHANGE responsabil_id responsabil_id_id INT NOT NULL');
$this->addSql('ALTER TABLE sarcini ADD CONSTRAINT FK_A1D34D0FC3ADF082 FOREIGN KEY (responsabil_id_id) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_A1D34D0FC3ADF082 ON sarcini (responsabil_id_id)');
}
}