<?php
declare(strict_types=1);
namespace EckinoxCoreMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20210909235743 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 eckinox_logs DROP FOREIGN KEY FK_EFB3A5454A3353D8');
$this->addSql('ALTER TABLE eckinox_logs DROP FOREIGN KEY FK_EFB3A545A76ED395');
$this->addSql('ALTER TABLE eckinox_logs ADD CONSTRAINT FK_EFB3A5454A3353D8 FOREIGN KEY (app_user_id) REFERENCES eckinox_app_users (id) ON DELETE SET NULL');
$this->addSql('ALTER TABLE eckinox_logs ADD CONSTRAINT FK_EFB3A545A76ED395 FOREIGN KEY (user_id) REFERENCES eckinox_users (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 eckinox_logs DROP FOREIGN KEY FK_EFB3A545A76ED395');
$this->addSql('ALTER TABLE eckinox_logs DROP FOREIGN KEY FK_EFB3A5454A3353D8');
$this->addSql('ALTER TABLE eckinox_logs ADD CONSTRAINT FK_EFB3A545A76ED395 FOREIGN KEY (user_id) REFERENCES eckinox_users (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('ALTER TABLE eckinox_logs ADD CONSTRAINT FK_EFB3A5454A3353D8 FOREIGN KEY (app_user_id) REFERENCES eckinox_app_users (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
}
}