<?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 Version20221013110225 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 static_data_store (id INT AUTO_INCREMENT NOT NULL, created_by_id INT DEFAULT NULL, files_id INT DEFAULT NULL, item VARCHAR(255) NOT NULL, value LONGTEXT DEFAULT NULL, locale VARCHAR(255) DEFAULT NULL, translations LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', data_type VARCHAR(30) DEFAULT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_at DATETIME DEFAULT NULL, INDEX IDX_921E82B3B03A8386 (created_by_id), UNIQUE INDEX UNIQ_921E82B3A3E65B2F (files_id), UNIQUE INDEX item (item, locale), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE static_data_store ADD CONSTRAINT FK_921E82B3B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id)');
$this->addSql('ALTER TABLE static_data_store ADD CONSTRAINT FK_921E82B3A3E65B2F FOREIGN KEY (files_id) REFERENCES biblios (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE static_data_store');
}
}