36 lines
740 B
PHP
36 lines
740 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 Version20240323095155 extends AbstractMigration
|
|
{
|
|
public function getDescription(): string
|
|
{
|
|
return 'add duration to video';
|
|
}
|
|
|
|
public function up(Schema $schema): void
|
|
{
|
|
$sql = "ALTER TABLE video
|
|
ADD COLUMN duration int NULL after title
|
|
;";
|
|
|
|
$this->addSql($sql);
|
|
}
|
|
|
|
public function down(Schema $schema): void
|
|
{
|
|
$this->addSql("ALTER TABLE video
|
|
DROP COLUMN duration
|
|
;");
|
|
}
|
|
}
|