cs: Fix code style (safe rules only).

This commit is contained in:
Pol Dellaiera
2021-11-23 14:06:38 +01:00
parent 149d7ce991
commit 8f96a1121d
1223 changed files with 65199 additions and 64625 deletions

View File

@@ -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;
@@ -8,38 +15,34 @@ use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Add AccompanyingPeriod Origin table
*
* @author Mathieu Jaumotte mathieu.jaumotte@champs-libres.coop
* Add AccompanyingPeriod Origin table.
*/
final class Version20210329090904 extends AbstractMigration
{
public function getDescription() : string
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE chill_person_accompanying_period DROP CONSTRAINT FK_E260A86856A273CC');
$this->addSql('DROP SEQUENCE chill_person_accompanying_period_origin_id_seq CASCADE');
$this->addSql('DROP TABLE chill_person_accompanying_period_origin');
$this->addSql('DROP INDEX IDX_E260A86856A273CC');
$this->addSql('ALTER TABLE chill_person_accompanying_period DROP origin_id');
}
public function getDescription(): string
{
return 'Add AccompanyingPeriod Origin table';
}
public function up(Schema $schema) : void
public function up(Schema $schema): void
{
$this->addSql('CREATE SEQUENCE chill_person_accompanying_period_origin_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE TABLE chill_person_accompanying_period_origin (id INT NOT NULL, label VARCHAR(255) NOT NULL, noActiveAfter DATE DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('COMMENT ON COLUMN chill_person_accompanying_period_origin.noActiveAfter IS \'(DC2Type:date_immutable)\'');
$this->addSql('ALTER TABLE chill_person_accompanying_period ADD origin_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE chill_person_accompanying_period ADD CONSTRAINT FK_E260A86856A273CC FOREIGN KEY (origin_id) REFERENCES chill_person_accompanying_period_origin (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_E260A86856A273CC ON chill_person_accompanying_period (origin_id)');
}
public function down(Schema $schema) : void
{
$this->addSql('ALTER TABLE chill_person_accompanying_period DROP CONSTRAINT FK_E260A86856A273CC');
$this->addSql('DROP SEQUENCE chill_person_accompanying_period_origin_id_seq CASCADE');
$this->addSql('DROP TABLE chill_person_accompanying_period_origin');
$this->addSql('DROP INDEX IDX_E260A86856A273CC');
$this->addSql('ALTER TABLE chill_person_accompanying_period DROP origin_id');
}
}