mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
add form to doc generation and custom form to admin template configuration
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\Migrations\DocGenerator;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
final class Version20211201191757 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Add options, active and link to entity in docgen_template';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE chill_docgen_template ADD active BOOLEAN DEFAULT true NOT NULL');
|
||||
$this->addSql('ALTER TABLE chill_docgen_template ADD entity VARCHAR(255) NOT NULL DEFAULT \'\'');
|
||||
$this->addSql('ALTER TABLE chill_docgen_template ADD template_options JSONB NOT NULL DEFAULT \'[]\'::jsonb ');
|
||||
$this->addSql('COMMENT ON COLUMN chill_docgen_template.template_options IS \'(DC2Type:json)\'');
|
||||
$this->addSql('ALTER TABLE chill_docgen_template DROP entities');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE chill_docgen_template DROP active');
|
||||
$this->addSql('ALTER TABLE chill_docgen_template DROP entity');
|
||||
$this->addSql('ALTER TABLE chill_docgen_template DROP template_options');
|
||||
$this->addSql('ALTER TABLE chill_docgen_template ADD entities TEXT');
|
||||
$this->addSql('COMMENT ON COLUMN chill_docgen_template.entities IS \'(DC2Type:simple_array)\'');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user