36 lines
959 B
PHP
36 lines
959 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace DoctrineMigrations;
|
|
|
|
use Doctrine\DBAL\Schema\Schema;
|
|
use Doctrine\Migrations\AbstractMigration;
|
|
|
|
/**
|
|
* Auto-generated Migration: Please modify to your needs!
|
|
*/
|
|
final class Version20260411141650 extends AbstractMigration
|
|
{
|
|
public function getDescription(): string
|
|
{
|
|
return '';
|
|
}
|
|
|
|
public function up(Schema $schema): void
|
|
{
|
|
$table = $schema->createTable('task');
|
|
$table->addColumn('id', 'integer', ['autoincrement' => true, 'notnull' => true]);
|
|
$table->addColumn('name', 'string', ['length' => 255, 'notnull' => true]);
|
|
$table->addColumn('date', 'date', ['notnull' => false]);
|
|
$table->addColumn('status', 'string', ['length' => 255, 'notnull' => true]);
|
|
$table->setPrimaryKey(['id']);
|
|
$table->addOption('charset', 'utf8mb4');
|
|
}
|
|
|
|
public function down(Schema $schema): void
|
|
{
|
|
$schema->dropTable('task');
|
|
}
|
|
}
|