mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
AccompanyingPeriodResource: fix deserialization + code style
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\Person;
|
||||
@@ -12,6 +19,14 @@ use Doctrine\Migrations\AbstractMigration;
|
||||
*/
|
||||
final class Version20220104133334 extends AbstractMigration
|
||||
{
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE chill_person_accompanying_period_resource ADD comment_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE chill_person_accompanying_period_resource DROP comment');
|
||||
$this->addSql('ALTER TABLE chill_person_accompanying_period_resource ADD CONSTRAINT fk_dc78989ff8697d13 FOREIGN KEY (comment_id) REFERENCES chill_person_accompanying_period_comment (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('CREATE INDEX idx_dc78989ff8697d13 ON chill_person_accompanying_period_resource (comment_id)');
|
||||
}
|
||||
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Replace accompanyingCourse Resources comment by a string';
|
||||
@@ -24,12 +39,4 @@ final class Version20220104133334 extends AbstractMigration
|
||||
$this->addSql('ALTER TABLE chill_person_accompanying_period_resource ADD comment TEXT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE chill_person_accompanying_period_resource DROP comment_id');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE chill_person_accompanying_period_resource ADD comment_id INT DEFAULT NULL');
|
||||
$this->addSql('ALTER TABLE chill_person_accompanying_period_resource DROP comment');
|
||||
$this->addSql('ALTER TABLE chill_person_accompanying_period_resource ADD CONSTRAINT fk_dc78989ff8697d13 FOREIGN KEY (comment_id) REFERENCES chill_person_accompanying_period_comment (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
|
||||
$this->addSql('CREATE INDEX idx_dc78989ff8697d13 ON chill_person_accompanying_period_resource (comment_id)');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user