class Version20181120225239 extends AbstractMigration
10
{
11
public function up(Schema $schema): void
12
{
13
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
14
15
$this->addSql('CREATE TABLE tag_resource (tag_id INT NOT NULL, resource_id INT NOT NULL, INDEX IDX_8AA08FCDBAD26311 (tag_id), INDEX IDX_8AA08FCD89329D25 (resource_id), PRIMARY KEY(tag_id, resource_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB');
16
$this->addSql('ALTER TABLE tag_resource ADD CONSTRAINT FK_8AA08FCDBAD26311 FOREIGN KEY (tag_id) REFERENCES tag (id) ON DELETE CASCADE');