Files
speedBB/api/migrations/Version20251224184500.php

28 lines
737 B
PHP

<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20251224184500 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add settings table with version and build metadata.';
}
public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE settings (id INT AUTO_INCREMENT NOT NULL, version VARCHAR(20) NOT NULL, build INT NOT NULL, PRIMARY KEY(id))');
$this->addSql("INSERT INTO settings (id, version, build) VALUES (1, '25.00.1', 3)");
}
public function down(Schema $schema): void
{
$this->addSql('DROP TABLE settings');
}
}