<?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 Version20220622233139 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('CREATE TABLE creator_badge (creator_id BIGINT UNSIGNED NOT NULL, badge_id INT UNSIGNED NOT NULL, INDEX IDX_71E35EA361220EA6 (creator_id), INDEX IDX_71E35EA3F7A2C2FC (badge_id), PRIMARY KEY(creator_id, badge_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE creator_badge ADD CONSTRAINT FK_71E35EA361220EA6 FOREIGN KEY (creator_id) REFERENCES creator (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE creator_badge ADD CONSTRAINT FK_71E35EA3F7A2C2FC FOREIGN KEY (badge_id) REFERENCES badge (id) ON DELETE CASCADE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE creator_badge');
}
public function isTransactional(): bool
{
return false;
}
}