<?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 Version20230112124928 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 addresses ADD manager_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE addresses ADD CONSTRAINT FK_6FCA7516783E3463 FOREIGN KEY (manager_id) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_6FCA7516783E3463 ON addresses (manager_id)');
$this->addSql('ALTER TABLE checks ADD manager_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE checks ADD CONSTRAINT FK_9F8C0079783E3463 FOREIGN KEY (manager_id) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_9F8C0079783E3463 ON checks (manager_id)');
$this->addSql('ALTER TABLE translations ADD manager_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE translations ADD CONSTRAINT FK_C6B7DA87783E3463 FOREIGN KEY (manager_id) REFERENCES user (id)');
$this->addSql('CREATE INDEX IDX_C6B7DA87783E3463 ON translations (manager_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE addresses DROP FOREIGN KEY FK_6FCA7516783E3463');
$this->addSql('DROP INDEX IDX_6FCA7516783E3463 ON addresses');
$this->addSql('ALTER TABLE addresses DROP manager_id');
$this->addSql('ALTER TABLE checks DROP FOREIGN KEY FK_9F8C0079783E3463');
$this->addSql('DROP INDEX IDX_9F8C0079783E3463 ON checks');
$this->addSql('ALTER TABLE checks DROP manager_id');
$this->addSql('ALTER TABLE translations DROP FOREIGN KEY FK_C6B7DA87783E3463');
$this->addSql('DROP INDEX IDX_C6B7DA87783E3463 ON translations');
$this->addSql('ALTER TABLE translations DROP manager_id');
}
}