<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20220630105603 extends AbstractMigration
{
public function down(Schema $schema): void
{
$this->addSql('DROP TABLE news_article');
}
public function getDescription(): string
{
return 'Create news_article table.';
}
public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE news_article (id INT AUTO_INCREMENT NOT NULL, archived TINYINT(1) NOT NULL, content LONGTEXT NOT NULL, date_posted DATETIME NOT NULL, thumbnail_filename VARCHAR(255) DEFAULT NULL,image_filename VARCHAR(255) DEFAULT NULL, title VARCHAR(127) NOT NULL, date_created DATETIME NOT NULL, date_modified DATETIME DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
}
}