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\ThirdParty;
@@ -8,10 +15,20 @@ use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Create trigger for canonicalisation on 3party + indexes
* Create trigger for canonicalisation on 3party + indexes.
*/
final class Version20211007165001 extends AbstractMigration
{
public function down(Schema $schema): void
{
$this->addSql('DROP TRIGGER canonicalize_fullname_on_update ON chill_3party.third_party');
$this->addSql('DROP TRIGGER canonicalize_fullname_on_insert ON chill_3party.third_party');
$this->addSql('DROP FUNCTION chill_3party.canonicalize()');
$this->addSql('
DROP INDEX chill_3party.chill_custom_canonicalized_trgm_idx_gist
');
}
public function getDescription(): string
{
return 'Create trigger for canonicalisation on 3party + indexes';
@@ -54,33 +71,23 @@ final class Version20211007165001 extends AbstractMigration
END
$$
");
$this->addSql("
$this->addSql('
CREATE TRIGGER canonicalize_fullname_on_insert
BEFORE INSERT
ON chill_3party.third_party
FOR EACH ROW
EXECUTE procedure chill_3party.canonicalize();
");
$this->addSql("
');
$this->addSql('
CREATE TRIGGER canonicalize_fullname_on_update
BEFORE UPDATE
ON chill_3party.third_party
FOR EACH ROW
EXECUTE procedure chill_3party.canonicalize();
");
$this->addSql("
');
$this->addSql('
CREATE INDEX chill_custom_canonicalized_trgm_idx_gist
ON chill_3party.third_party USING GIST (canonicalized gist_trgm_ops) WHERE active IS TRUE
");
}
public function down(Schema $schema): void
{
$this->addSql('DROP TRIGGER canonicalize_fullname_on_update ON chill_3party.third_party');
$this->addSql('DROP TRIGGER canonicalize_fullname_on_insert ON chill_3party.third_party');
$this->addSql('DROP FUNCTION chill_3party.canonicalize()');
$this->addSql("
DROP INDEX chill_3party.chill_custom_canonicalized_trgm_idx_gist
");
');
}
}