ogcore/migrations/Version20261022100000.php

30 lines
1.4 KiB
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 Version20261022100000 extends AbstractMigration
{
public function getDescription(): string
{
return 'Create og_plugins table for modular plugin infrastructure';
}
public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE og_plugins (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, name VARCHAR(255) NOT NULL, title VARCHAR(255) NOT NULL, version VARCHAR(50) NOT NULL, description LONGTEXT DEFAULT NULL, author VARCHAR(255) DEFAULT NULL, icon VARCHAR(100) DEFAULT NULL, enabled TINYINT(1) NOT NULL, commands JSON DEFAULT NULL COMMENT \'(DC2Type:json)\', schema_definition JSON DEFAULT NULL COMMENT \'(DC2Type:json)\', config_data JSON DEFAULT NULL COMMENT \'(DC2Type:json)\', UNIQUE INDEX UNIQ_OG_PLUGIN_UUID (uuid), UNIQUE INDEX UNIQ_OG_PLUGIN_NAME (name), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
}
public function down(Schema $schema): void
{
$this->addSql('DROP TABLE og_plugins');
}
}