<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20250322011512 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
const NAME = 'dtb_banner';
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
if ($schema->hasTable(self::NAME)) {
return;
}
$this->addSql("CREATE TABLE dtb_banner (
id SMALLINT unsigned NOT NULL AUTO_INCREMENT,
status BOOLEAN DEFAULT TRUE,
url VARCHAR(255) NULL DEFAULT NULL,
link_method SMALLINT(5) NULL DEFAULT NULL,
image VARCHAR(255) NULL DEFAULT NULL,
type TINYINT(5) NULL DEFAULT NULL,
sort_no SMALLINT(5) NULL DEFAULT NULL,
create_date datetime NOT NULL COMMENT '(DC2Type:datetimetz)',
update_date datetime NOT NULL COMMENT '(DC2Type:datetimetz)',
discriminator_type VARCHAR(255) NOT NULL,
PRIMARY KEY(id)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
");
$this->addSql("INSERT INTO dtb_block (device_type_id, block_name, file_name, use_controller, deletable, create_date, update_date, discriminator_type) VALUES ('10', 'トピックバナー', 'content_topic_banner', '0', '0', NOW(), NOW(), 'block')");
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE dtb_banner');
}
}