mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
Generate a context for docgen, on accompanying period
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\Migrations\DocGenerator;
|
||||
@@ -8,10 +15,20 @@ use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Using DocStore objects inside the DocGenTemplate
|
||||
* Using DocStore objects inside the DocGenTemplate.
|
||||
*/
|
||||
final class Version20211103111010 extends AbstractMigration
|
||||
{
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE chill_docgen_template DROP CONSTRAINT FK_49A347E893CB796C');
|
||||
$this->addSql('DROP INDEX IDX_49A347E893CB796C');
|
||||
$this->addSql('ALTER TABLE chill_docgen_template ADD file VARCHAR(255) NOT NULL');
|
||||
$this->addSql('ALTER TABLE chill_docgen_template DROP file_id');
|
||||
$this->addSql('ALTER TABLE chill_docgen_template ALTER entities DROP NOT NULL');
|
||||
$this->addSql('ALTER TABLE chill_docgen_template ALTER context DROP NOT NULL');
|
||||
}
|
||||
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Using DocStore objects inside the DocGenTemplate';
|
||||
@@ -26,14 +43,4 @@ final class Version20211103111010 extends AbstractMigration
|
||||
$this->addSql('ALTER TABLE chill_docgen_template ADD CONSTRAINT FK_49A347E893CB796C FOREIGN KEY (file_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('CREATE INDEX IDX_49A347E893CB796C ON chill_docgen_template (file_id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE chill_docgen_template DROP CONSTRAINT FK_49A347E893CB796C');
|
||||
$this->addSql('DROP INDEX IDX_49A347E893CB796C');
|
||||
$this->addSql('ALTER TABLE chill_docgen_template ADD file VARCHAR(255) NOT NULL');
|
||||
$this->addSql('ALTER TABLE chill_docgen_template DROP file_id');
|
||||
$this->addSql('ALTER TABLE chill_docgen_template ALTER entities DROP NOT NULL');
|
||||
$this->addSql('ALTER TABLE chill_docgen_template ALTER context DROP NOT NULL');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user