<?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 Version20231026072544 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql("CREATE TABLE `podcast` (`id` INT NOT NULL AUTO_INCREMENT , `category_id` INT NULL , `title` VARCHAR(255) NULL , `sub_title` VARCHAR(255) NULL , `episode_num` INT NULL , `podcast_date` DATETIME NULL , `image` VARCHAR(255) NULL , `description` TEXT NULL , `teaser_1` VARCHAR(255) NULL , `teaser_2` VARCHAR(255) NULL , `teaser_3` VARCHAR(255) NULL , `teaser_4` VARCHAR(255) NULL , `is_premium` ENUM('0','1') NULL DEFAULT '0' COMMENT '0-->unpublished 1-->published' , `sort_order` INT NULL , `is_active` ENUM('0','1') NOT NULL DEFAULT '1' COMMENT '0-->inactive 1-->active' , `sponsor_title` VARCHAR(255) NULL , `sponsor_website` VARCHAR(255) NULL , `sponsor_social_media_link` VARCHAR(255) NULL , `created_at` DATETIME NULL , `updated_at` DATETIME NULL , `deleted_at` DATETIME NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB;");
$this->addSql("ALTER TABLE `podcast` ADD `slug` VARCHAR(255) NULL AFTER `title`;");
$this->addSql("ALTER TABLE `podcast` ADD `created_by` INT NOT NULL AFTER `id`;");
}
public function down(Schema $schema): void
{
$this->addSql("DROP TABLE podcast");
}
}