<?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 Version20220629094044 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE learning_video (id INT AUTO_INCREMENT NOT NULL, learning_page_id INT NOT NULL, title VARCHAR(400) NOT NULL, description LONGTEXT DEFAULT NULL, duration VARCHAR(100) DEFAULT NULL, link VARCHAR(255) DEFAULT NULL, image_name VARCHAR(255) DEFAULT NULL, updated_at DATETIME NOT NULL, INDEX IDX_82559116C8E1DB17 (learning_page_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE learning_video ADD CONSTRAINT FK_82559116C8E1DB17 FOREIGN KEY (learning_page_id) REFERENCES learning_page (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE learning_video');
}
}