<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20220704161534 extends AbstractMigration
{
public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE pictogram (id INT AUTO_INCREMENT NOT NULL, visiting_card_id INT DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, icon VARCHAR(255) DEFAULT NULL, is_active TINYINT(1) DEFAULT NULL, INDEX IDX_56E0A15FEB37EBA0 (visiting_card_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE pictogram ADD CONSTRAINT FK_56E0A15FEB37EBA0 FOREIGN KEY (visiting_card_id) REFERENCES visiting_card (id)');
}
public function down(Schema $schema): void
{
$this->addSql('DROP TABLE pictogram');
}
}