<?php
declare(strict_types=1);
namespace Boldr\Cms\CmsBundle\Migrations;
use Doctrine\DBAL\Schema\Schema;
use Boldr\Cms\CmsBundle\BoldrCmsMigration;
final class Version1_8_0 extends BoldrCmsMigration
{
public function getBundle(): string { return 'boldr/cms-bundle'; }
public function getVersion(): ?string { return '1.8.0'; }
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE cms_page ADD primary_image_id INT UNSIGNED DEFAULT NULL');
$this->addSql('ALTER TABLE cms_page ADD CONSTRAINT FK_D39C1B5D1CDA489C FOREIGN KEY (primary_image_id) REFERENCES cms_attachment (id)');
$this->addSql('CREATE INDEX IDX_D39C1B5D1CDA489C ON cms_page (primary_image_id)');
$this->addSql('ALTER TABLE cms_page_translation ADD description VARCHAR(1000) NOT NULL');
}
}