migrations/Version20210223111932.php line 1
<?php
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20210223111932 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE media ADD preview_filename VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE media ADD use_prview_image BOOLEAN DEFAULT \'false\'');
$this->addSql('COMMENT ON COLUMN media.preview_filename IS \'Preview filename\'');
$this->addSql('COMMENT ON COLUMN media.use_prview_image IS \'Preview image as link to main media file\'');
}
/**
* @param Schema $schema
*/
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE media DROP preview_filename');
$this->addSql('ALTER TABLE media DROP use_prview_image');
}
}