34 lines
752 B
PHP
34 lines
752 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace MyTube\Migrations\MyTube;
|
|
|
|
use Doctrine\DBAL\Schema\Schema;
|
|
use Doctrine\Migrations\AbstractMigration;
|
|
|
|
final class Version20230922085011 extends AbstractMigration
|
|
{
|
|
public function getDescription(): string
|
|
{
|
|
return "Create Table 'role'";
|
|
}
|
|
|
|
public function up(Schema $schema): void
|
|
{
|
|
$sql = "CREATE TABLE role (
|
|
id binary(16) NOT NULL,
|
|
product_id binary(16) DEFAULT NULL,
|
|
identifier varchar(255) UNIQUE NOT NULL,
|
|
PRIMARY KEY (id)
|
|
);";
|
|
|
|
$this->addSql($sql);
|
|
}
|
|
|
|
public function down(Schema $schema): void
|
|
{
|
|
$this->addSql("DROP TABLE role;");
|
|
}
|
|
}
|