<?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 Version20240726103445 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 file DROP FOREIGN KEY FK_8C9F3610B03A8386');
$this->addSql('ALTER TABLE file CHANGE created_by_id created_by_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE file ADD CONSTRAINT FK_8C9F3610B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE job DROP FOREIGN KEY FK_FBD8E0F8896DBBDE');
$this->addSql('ALTER TABLE job DROP FOREIGN KEY FK_FBD8E0F8B03A8386');
$this->addSql('ALTER TABLE job CHANGE created_by_id created_by_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE job ADD CONSTRAINT FK_FBD8E0F8896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE job ADD CONSTRAINT FK_FBD8E0F8B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE location DROP FOREIGN KEY FK_5E9E89CB896DBBDE');
$this->addSql('ALTER TABLE location DROP FOREIGN KEY FK_5E9E89CBB03A8386');
$this->addSql('ALTER TABLE location CHANGE created_by_id created_by_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE location ADD CONSTRAINT FK_5E9E89CB896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE location ADD CONSTRAINT FK_5E9E89CBB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE location_translation DROP FOREIGN KEY FK_A2BCA22B896DBBDE');
$this->addSql('ALTER TABLE location_translation DROP FOREIGN KEY FK_A2BCA22BB03A8386');
$this->addSql('ALTER TABLE location_translation CHANGE created_by_id created_by_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE location_translation ADD CONSTRAINT FK_A2BCA22B896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE location_translation ADD CONSTRAINT FK_A2BCA22BB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE news DROP FOREIGN KEY FK_1DD39950896DBBDE');
$this->addSql('ALTER TABLE news DROP FOREIGN KEY FK_1DD39950B03A8386');
$this->addSql('ALTER TABLE news CHANGE created_by_id created_by_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE news ADD CONSTRAINT FK_1DD39950896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE news ADD CONSTRAINT FK_1DD39950B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE news_translation DROP FOREIGN KEY FK_9D5CF320896DBBDE');
$this->addSql('ALTER TABLE news_translation DROP FOREIGN KEY FK_9D5CF320B03A8386');
$this->addSql('ALTER TABLE news_translation CHANGE created_by_id created_by_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE news_translation ADD CONSTRAINT FK_9D5CF320896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE news_translation ADD CONSTRAINT FK_9D5CF320B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE setting DROP FOREIGN KEY FK_9F74B898896DBBDE');
$this->addSql('ALTER TABLE setting DROP FOREIGN KEY FK_9F74B898B03A8386');
$this->addSql('ALTER TABLE setting CHANGE created_by_id created_by_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE setting ADD CONSTRAINT FK_9F74B898896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE setting ADD CONSTRAINT FK_9F74B898B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649896DBBDE');
$this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649B03A8386');
$this->addSql('ALTER TABLE user ADD CONSTRAINT FK_8D93D649896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE user ADD CONSTRAINT FK_8D93D649B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id) ON DELETE SET NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE location DROP FOREIGN KEY FK_5E9E89CBB03A8386');
$this->addSql('ALTER TABLE location DROP FOREIGN KEY FK_5E9E89CB896DBBDE');
$this->addSql('ALTER TABLE location CHANGE created_by_id created_by_id INT NOT NULL');
$this->addSql('ALTER TABLE location ADD CONSTRAINT FK_5E9E89CBB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE location ADD CONSTRAINT FK_5E9E89CB896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE location_translation DROP FOREIGN KEY FK_A2BCA22BB03A8386');
$this->addSql('ALTER TABLE location_translation DROP FOREIGN KEY FK_A2BCA22B896DBBDE');
$this->addSql('ALTER TABLE location_translation CHANGE created_by_id created_by_id INT NOT NULL');
$this->addSql('ALTER TABLE location_translation ADD CONSTRAINT FK_A2BCA22BB03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE location_translation ADD CONSTRAINT FK_A2BCA22B896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE news_translation DROP FOREIGN KEY FK_9D5CF320B03A8386');
$this->addSql('ALTER TABLE news_translation DROP FOREIGN KEY FK_9D5CF320896DBBDE');
$this->addSql('ALTER TABLE news_translation CHANGE created_by_id created_by_id INT NOT NULL');
$this->addSql('ALTER TABLE news_translation ADD CONSTRAINT FK_9D5CF320B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE news_translation ADD CONSTRAINT FK_9D5CF320896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE news DROP FOREIGN KEY FK_1DD39950B03A8386');
$this->addSql('ALTER TABLE news DROP FOREIGN KEY FK_1DD39950896DBBDE');
$this->addSql('ALTER TABLE news CHANGE created_by_id created_by_id INT NOT NULL');
$this->addSql('ALTER TABLE news ADD CONSTRAINT FK_1DD39950B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE news ADD CONSTRAINT FK_1DD39950896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE setting DROP FOREIGN KEY FK_9F74B898B03A8386');
$this->addSql('ALTER TABLE setting DROP FOREIGN KEY FK_9F74B898896DBBDE');
$this->addSql('ALTER TABLE setting CHANGE created_by_id created_by_id INT NOT NULL');
$this->addSql('ALTER TABLE setting ADD CONSTRAINT FK_9F74B898B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE setting ADD CONSTRAINT FK_9F74B898896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE job DROP FOREIGN KEY FK_FBD8E0F8B03A8386');
$this->addSql('ALTER TABLE job DROP FOREIGN KEY FK_FBD8E0F8896DBBDE');
$this->addSql('ALTER TABLE job CHANGE created_by_id created_by_id INT NOT NULL');
$this->addSql('ALTER TABLE job ADD CONSTRAINT FK_FBD8E0F8B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE job ADD CONSTRAINT FK_FBD8E0F8896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE file DROP FOREIGN KEY FK_8C9F3610B03A8386');
$this->addSql('ALTER TABLE file CHANGE created_by_id created_by_id INT NOT NULL');
$this->addSql('ALTER TABLE file ADD CONSTRAINT FK_8C9F3610B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649B03A8386');
$this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649896DBBDE');
$this->addSql('ALTER TABLE user ADD CONSTRAINT FK_8D93D649B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)');
$this->addSql('ALTER TABLE user ADD CONSTRAINT FK_8D93D649896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)');
}
}