configstuff

This commit is contained in:
lubiana 2025-06-14 20:21:36 +02:00
parent ca0e7d300d
commit c3411e5754
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
12 changed files with 243 additions and 121 deletions

View file

@ -0,0 +1,52 @@
<?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 Version20250614171912 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql(<<<'SQL'
ALTER TABLE system_config ADD COLUMN description CLOB DEFAULT '' NOT NULL
SQL);
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql(<<<'SQL'
CREATE TEMPORARY TABLE __temp__system_config AS SELECT id, created_at, updated_at, "key", value FROM system_config
SQL);
$this->addSql(<<<'SQL'
DROP TABLE system_config
SQL);
$this->addSql(<<<'SQL'
CREATE TABLE system_config (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, created_at DATETIME NOT NULL --(DC2Type:datetime_immutable)
, updated_at DATETIME NOT NULL --(DC2Type:datetime_immutable)
, "key" VARCHAR(255) NOT NULL, value CLOB NOT NULL)
SQL);
$this->addSql(<<<'SQL'
INSERT INTO system_config (id, created_at, updated_at, "key", value) SELECT id, created_at, updated_at, "key", value FROM __temp__system_config
SQL);
$this->addSql(<<<'SQL'
DROP TABLE __temp__system_config
SQL);
$this->addSql(<<<'SQL'
CREATE UNIQUE INDEX UNIQ_C4049ABD8A90ABA9 ON system_config ("key")
SQL);
}
}