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

39 lines
911 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 Version20240214194156 extends AbstractMigration
{
public function getDescription(): string
{
return "Create Table 'video'";
}
public function up(Schema $schema): void
{
$sql = "CREATE TABLE video (
id binary(16) NOT NULL,
title varchar(255) NOT NULL,
directory_path varchar(255) NOT NULL,
created_at datetime NOT NULL,
updated_at datetime NOT NULL,
PRIMARY KEY (id)
);";
$this->addSql($sql);
}
public function down(Schema $schema): void
{
$this->addSql("DROP TABLE video;");
}
}