<?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 Version20250815142017 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE std_pages_content_type_approvers (id INT AUTO_INCREMENT NOT NULL, content_types_id INT UNSIGNED DEFAULT NULL COMMENT \'Unique identifier\', approver_role_id INT UNSIGNED DEFAULT NULL COMMENT \'Role unique identifier\', INDEX IDX_92388FA7DC05D9B8 (content_types_id), INDEX IDX_92388FA72FAAA473 (approver_role_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE std_pages_content_type_approvers ADD CONSTRAINT FK_92388FA7DC05D9B8 FOREIGN KEY (content_types_id) REFERENCES std_content_types (id)');
$this->addSql('ALTER TABLE std_pages_content_type_approvers ADD CONSTRAINT FK_92388FA72FAAA473 FOREIGN KEY (approver_role_id) REFERENCES std_roles (id)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE std_pages_content_type_approvers DROP FOREIGN KEY FK_92388FA7DC05D9B8');
$this->addSql('ALTER TABLE std_pages_content_type_approvers DROP FOREIGN KEY FK_92388FA72FAAA473');
$this->addSql('DROP TABLE std_pages_content_type_approvers');
}
}