<?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 Version20240301143150 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 kc_required_action_kc_user DROP FOREIGN KEY FK_38748F9D1967C711');
$this->addSql('ALTER TABLE kc_required_action_kc_user DROP FOREIGN KEY FK_38748F9D7560A6B0');
$this->addSql('DROP TABLE kc_required_action_kc_user');
$this->addSql('DROP TABLE kc_required_action');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE kc_required_action_kc_user (kc_required_action_id INT NOT NULL, kc_user_id INT NOT NULL, INDEX IDX_38748F9D1967C711 (kc_user_id), INDEX IDX_38748F9D7560A6B0 (kc_required_action_id), PRIMARY KEY(kc_required_action_id, kc_user_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('CREATE TABLE kc_required_action (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(31) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE kc_required_action_kc_user ADD CONSTRAINT FK_38748F9D1967C711 FOREIGN KEY (kc_user_id) REFERENCES kc_user (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE kc_required_action_kc_user ADD CONSTRAINT FK_38748F9D7560A6B0 FOREIGN KEY (kc_required_action_id) REFERENCES kc_required_action (id) ON DELETE CASCADE');
}
}