<?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 Version20221005231700 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 video_pending (id BIGINT AUTO_INCREMENT NOT NULL, activity_id BIGINT UNSIGNED DEFAULT NULL, creator_id BIGINT UNSIGNED DEFAULT NULL, video_url VARCHAR(255) NOT NULL, retry_count INT UNSIGNED DEFAULT 0 NOT NULL, last_checked_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_3138931481C06096 (activity_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE video_pending ADD CONSTRAINT FK_3138931481C06096 FOREIGN KEY (activity_id) REFERENCES activity (id)');
$this->addSql('ALTER TABLE video_pending ADD CONSTRAINT FK_3138931461220EA6 FOREIGN KEY (creator_id) REFERENCES creator (id)');
$this->addSql('CREATE INDEX IDX_3138931461220EA6 ON video_pending (creator_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE video_pending');
}
public function isTransactional(): bool
{
return false;
}
}