mytube-backend/data/migrations/myTube/Version20240229205003.php
2024-08-04 14:23:33 +00:00

38 lines
875 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 Version20240229205003 extends AbstractMigration
{
public function getDescription(): string
{
return 'video_event';
}
public function up(Schema $schema): void
{
$sql = "CREATE TABLE video_event (
id binary(16) NOT NULL,
video_id binary(16) NOT NULL,
datetime datetime NOT NULL,
type varchar(255) NOT NULL,
PRIMARY KEY (video_id, datetime, type)
);";
$this->addSql($sql);
}
public function down(Schema $schema): void
{
$this->addSql("DROP TABLE video_event;");
}
}