fix maigrations

This commit is contained in:
team2
2026-02-21 19:23:38 +01:00
parent 41fe7fa0d4
commit 61e6e61b8b
2 changed files with 74 additions and 52 deletions

View File

@@ -0,0 +1,40 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20260221000300 extends AbstractMigration
{
public function getDescription(): string
{
return 'Creates tag_rebuild_job table (MariaDB compatible, binary UUID)';
}
public function up(Schema $schema): void
{
$this->addSql("
CREATE TABLE tag_rebuild_job (
id BINARY(16) NOT NULL,
status VARCHAR(16) NOT NULL,
created_at DATETIME NOT NULL,
started_at DATETIME DEFAULT NULL,
finished_at DATETIME DEFAULT NULL,
error_message TEXT DEFAULT NULL,
PRIMARY KEY(id),
INDEX idx_tag_rebuild_job_status (status),
INDEX idx_tag_rebuild_job_created_at (created_at)
) ENGINE=InnoDB
DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_unicode_ci
");
}
public function down(Schema $schema): void
{
$this->addSql("DROP TABLE tag_rebuild_job");
}
}