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,15 +1,31 @@
<?php declare(strict_types=1);
<?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\DocStore;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Create schema for chill_doc
* Create schema for chill_doc.
*/
final class Version20180605102533 extends AbstractMigration
{
public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('DROP SCHEMA chill_doc CASCADE');
}
public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
@@ -27,12 +43,4 @@ final class Version20180605102533 extends AbstractMigration
$this->addSql('ALTER TABLE chill_doc.person_document ADD CONSTRAINT FK_41DA53CA76ED395 FOREIGN KEY (user_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE chill_doc.person_document ADD CONSTRAINT FK_41DA53C217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
}
public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('DROP SCHEMA chill_doc CASCADE');
}
}

View File

@@ -1,15 +1,35 @@
<?php declare(strict_types=1);
<?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\DocStore;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Add schema for stored object
* Add schema for stored object.
*/
final class Version20180606133338 extends AbstractMigration
{
public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE chill_doc.person_document DROP CONSTRAINT FK_41DA53C232D562B');
$this->addSql('DROP SEQUENCE chill_doc.stored_object_id_seq CASCADE');
$this->addSql('DROP TABLE chill_doc.stored_object');
$this->addSql('ALTER TABLE chill_doc.person_document ADD content TEXT DEFAULT NULL');
$this->addSql('ALTER TABLE chill_doc.person_document DROP object_id');
}
public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
@@ -21,15 +41,4 @@ final class Version20180606133338 extends AbstractMigration
$this->addSql('ALTER TABLE chill_doc.person_document ADD CONSTRAINT FK_41DA53C232D562B FOREIGN KEY (object_id) REFERENCES chill_doc.stored_object (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_41DA53C232D562B ON chill_doc.person_document (object_id)');
}
public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE chill_doc.person_document DROP CONSTRAINT FK_41DA53C232D562B');
$this->addSql('DROP SEQUENCE chill_doc.stored_object_id_seq CASCADE');
$this->addSql('DROP TABLE chill_doc.stored_object');
$this->addSql('ALTER TABLE chill_doc.person_document ADD content TEXT DEFAULT NULL');
$this->addSql('ALTER TABLE chill_doc.person_document DROP object_id');
}
}

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\DocStore;
@@ -12,6 +19,12 @@ use Doctrine\Migrations\AbstractMigration;
*/
final class Version20210903091534 extends AbstractMigration
{
public function down(Schema $schema): void
{
$this->addSql('DROP SEQUENCE chill_doc.accompanyingcourse_document_id_seq CASCADE');
$this->addSql('DROP TABLE chill_doc.accompanyingcourse_document');
}
public function getDescription(): string
{
return '';
@@ -24,10 +37,4 @@ final class Version20210903091534 extends AbstractMigration
$this->addSql('CREATE INDEX IDX_A45098F6591CC992 ON chill_doc.accompanyingcourse_document (course_id)');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document ADD CONSTRAINT FK_A45098F6591CC992 FOREIGN KEY (course_id) REFERENCES chill_person_accompanying_period (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
}
public function down(Schema $schema): void
{
$this->addSql('DROP SEQUENCE chill_doc.accompanyingcourse_document_id_seq CASCADE');
$this->addSql('DROP TABLE chill_doc.accompanyingcourse_document');
}
}

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\DocStore;
@@ -12,6 +19,26 @@ use Doctrine\Migrations\AbstractMigration;
*/
final class Version20210903123835 extends AbstractMigration
{
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP CONSTRAINT FK_A45098F6369A0BE36EF62EFC');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP CONSTRAINT FK_A45098F6232D562B');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP CONSTRAINT FK_A45098F6682B5931');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP CONSTRAINT FK_A45098F6A76ED395');
$this->addSql('DROP INDEX IDX_A45098F6369A0BE36EF62EFC');
$this->addSql('DROP INDEX IDX_A45098F6232D562B');
$this->addSql('DROP INDEX IDX_A45098F6682B5931');
$this->addSql('DROP INDEX IDX_A45098F6A76ED395');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP category_bundle_id');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP category_id_inside_bundle');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP object_id');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP scope_id');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP user_id');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP title');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP description');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP date');
}
public function getDescription(): string
{
return '';
@@ -36,24 +63,4 @@ final class Version20210903123835 extends AbstractMigration
$this->addSql('CREATE INDEX IDX_A45098F6682B5931 ON chill_doc.accompanyingcourse_document (scope_id)');
$this->addSql('CREATE INDEX IDX_A45098F6A76ED395 ON chill_doc.accompanyingcourse_document (user_id)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP CONSTRAINT FK_A45098F6369A0BE36EF62EFC');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP CONSTRAINT FK_A45098F6232D562B');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP CONSTRAINT FK_A45098F6682B5931');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP CONSTRAINT FK_A45098F6A76ED395');
$this->addSql('DROP INDEX IDX_A45098F6369A0BE36EF62EFC');
$this->addSql('DROP INDEX IDX_A45098F6232D562B');
$this->addSql('DROP INDEX IDX_A45098F6682B5931');
$this->addSql('DROP INDEX IDX_A45098F6A76ED395');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP category_bundle_id');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP category_id_inside_bundle');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP object_id');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP scope_id');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP user_id');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP title');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP description');
$this->addSql('ALTER TABLE chill_doc.accompanyingcourse_document DROP date');
}
}

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\DocStore;
@@ -9,6 +16,11 @@ use Doctrine\Migrations\AbstractMigration;
final class Version20210928182542 extends AbstractMigration
{
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE chill_doc.stored_object DROP uuid');
}
public function getDescription(): string
{
return 'Create UUID column on StoredObject table.';
@@ -22,9 +34,4 @@ final class Version20210928182542 extends AbstractMigration
$this->addSql('ALTER TABLE chill_doc.stored_object ALTER uuid SET NOT NULL');
$this->addSql('CREATE UNIQUE INDEX UNIQ_49604E36D17F50A6 ON chill_doc.stored_object (uuid)');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE chill_doc.stored_object DROP uuid');
}
}

View File

@@ -1,4 +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\DocStore;
@@ -8,6 +16,11 @@ use Doctrine\Migrations\AbstractMigration;
final class Version20211119173558 extends AbstractMigration
{
public function down(Schema $schema): void
{
$this->throwIrreversibleMigrationException();
}
public function getDescription(): string
{
return 'remove comment on deprecated json_array type';
@@ -23,12 +36,7 @@ final class Version20211119173558 extends AbstractMigration
];
foreach ($columns as $col) {
$this->addSql("COMMENT ON COLUMN $col IS NULL");
$this->addSql("COMMENT ON COLUMN {$col} IS NULL");
}
}
public function down(Schema $schema): void
{
$this->throwIrreversibleMigrationException();
}
}