<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20151110151215 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() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('CREATE TABLE content_page (id INT AUTO_INCREMENT NOT NULL, title VARCHAR(255) DEFAULT NULL, type INT DEFAULT 0, body LONGTEXT DEFAULT NULL, teaser VARCHAR(255) DEFAULT NULL, image VARCHAR(255) DEFAULT NULL, path_alias VARCHAR(255) DEFAULT NULL, comment LONGTEXT DEFAULT NULL, created_by INT DEFAULT NULL, modified_by INT DEFAULT NULL, creation_date DATETIME NOT NULL, modified_date DATETIME DEFAULT NULL, deleted TINYINT(1) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
$this->addSql('ALTER TABLE content_page ADD FOREIGN KEY (created_by) REFERENCES user (id)');
$this->addSql('ALTER TABLE content_page ADD FOREIGN KEY (modified_by) REFERENCES user (id)');
}
/**
* @param Schema $schema
*/
public function down(Schema $schema): void
{
}
}