<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
final class Version20211118181748 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_app_users ADD client_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE eckinox_app_users ADD CONSTRAINT FK_6618975019EB6921 FOREIGN KEY (client_id) REFERENCES `mallette_client` (id)');
$this->addSql('CREATE INDEX IDX_6618975019EB6921 ON eckinox_app_users (client_id)');
$this->addSql('ALTER TABLE eckinox_users DROP FOREIGN KEY FK_70F7314A19EB6921');
$this->addSql('DROP INDEX IDX_70F7314A19EB6921 ON eckinox_users');
$this->addSql('ALTER TABLE eckinox_users DROP client_id');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE eckinox_app_users DROP FOREIGN KEY FK_6618975019EB6921');
$this->addSql('DROP INDEX IDX_6618975019EB6921 ON eckinox_app_users');
$this->addSql('ALTER TABLE eckinox_app_users DROP client_id');
$this->addSql('ALTER TABLE eckinox_users ADD client_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE eckinox_users ADD CONSTRAINT FK_70F7314A19EB6921 FOREIGN KEY (client_id) REFERENCES mallette_client (id) ON UPDATE NO ACTION ON DELETE NO ACTION');
$this->addSql('CREATE INDEX IDX_70F7314A19EB6921 ON eckinox_users (client_id)');
}
public function isTransactional(): bool
{
return false;
}
}