configstuff
This commit is contained in:
parent
ca0e7d300d
commit
c3411e5754
12 changed files with 243 additions and 121 deletions
52
migrations/Version20250614171912.php
Normal file
52
migrations/Version20250614171912.php
Normal 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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue