migrations/Version20200714070604.php line 1
<?php
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20200714070604 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('CREATE SEQUENCE seq_page_content_id INCREMENT BY 1 MINVALUE 1 START 1;');
$this->addSql('CREATE TABLE page_content(
id int4 NOT NULL,
alias varchar(64) NOT NULL,
title varchar(64) NOT NULL,
content text NOT NULL,
PRIMARY KEY (id));
');
}
/**
* @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('DROP SEQUENCE seq_page_content_id');
$this->addSql('DROP TABLE page_content');
}
}