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,21 +1,36 @@
<?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.
*/
namespace Chill\Migrations\Person;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* This migration store the cfdata using the postgresql jsonb type instead
* of the result of the sterialization
* of the result of the sterialization.
*/
class Version20160818113633 extends AbstractMigration
{
/**
* Inverse of up.
*/
public function down(Schema $schema): void
{
$this->addSQL('ALTER TABLE person DROP COLUMN cfdata');
$this->addSQL('ALTER TABLE person RENAME COLUMN cfdata_old TO cfdata');
$this->addSql('ALTER TABLE person ALTER COLUMN cfdata SET NOT NULL');
}
/**
* Make a copy of the column cfdata into the column cfdata_old. Then
* remplace the sterialized data into a json data.
*
* @param Schema $schema
*/
public function up(Schema $schema): void
{
@@ -35,16 +50,4 @@ class Version20160818113633 extends AbstractMigration
);
}
}
/**
* Inverse of up
*
* @param Schema $schema
*/
public function down(Schema $schema): void
{
$this->addSQL('ALTER TABLE person DROP COLUMN cfdata');
$this->addSQL('ALTER TABLE person RENAME COLUMN cfdata_old TO cfdata');
$this->addSql('ALTER TABLE person ALTER COLUMN cfdata SET NOT NULL');
}
}