36 lines
784 B
PHP
36 lines
784 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace MyTube\Migrations\MyTube;
|
|
|
|
use Doctrine\DBAL\Schema\Schema;
|
|
use Doctrine\Migrations\AbstractMigration;
|
|
|
|
/**
|
|
* Auto-generated Migration: Please modify to your needs!
|
|
*/
|
|
final class Version20240223142111 extends AbstractMigration
|
|
{
|
|
public function getDescription(): string
|
|
{
|
|
return "Create Table 'video_tag'";
|
|
}
|
|
|
|
public function up(Schema $schema): void
|
|
{
|
|
$sql = "CREATE TABLE video_tag (
|
|
video_id binary(16) NOT NULL,
|
|
tag_id binary(16) NOT NULL,
|
|
PRIMARY KEY (video_id, tag_id)
|
|
);";
|
|
|
|
$this->addSql($sql);
|
|
}
|
|
|
|
public function down(Schema $schema): void
|
|
{
|
|
$this->addSql("DROP TABLE video_tag;");
|
|
}
|
|
}
|