apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -23,7 +23,7 @@ class Version20150607231010 extends AbstractMigration
public function down(Schema $schema): void
{
$this->abortIf(
$this->connection->getDatabasePlatform()->getName() !== 'postgresql',
'postgresql' !== $this->connection->getDatabasePlatform()->getName(),
'Migration can only be executed safely on \'postgresql\'.'
);
@@ -35,13 +35,13 @@ class Version20150607231010 extends AbstractMigration
public function getDescription(): string
{
return 'Add a center on the person entity. The default center is the first '
. 'recorded.';
.'recorded.';
}
public function up(Schema $schema): void
{
$this->abortIf(
$this->connection->getDatabasePlatform()->getName() !== 'postgresql',
'postgresql' !== $this->connection->getDatabasePlatform()->getName(),
'Migration can only be executed safely on \'postgresql\'.'
);
@@ -63,8 +63,8 @@ class Version20150607231010 extends AbstractMigration
// time of writing (2021-11-09)
$this->addSql('ALTER TABLE person ALTER center_id SET NOT NULL');
$this->addSql('ALTER TABLE person '
. 'ADD CONSTRAINT FK_person_center FOREIGN KEY (center_id) '
. 'REFERENCES centers (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
.'ADD CONSTRAINT FK_person_center FOREIGN KEY (center_id) '
.'REFERENCES centers (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('CREATE INDEX IDX_person_center ON person (center_id)');
}
}

View File

@@ -25,7 +25,7 @@ class Version20150811152608 extends AbstractMigration
public function down(Schema $schema): void
{
$this->abortIf(
$this->connection->getDatabasePlatform()->getName() !== 'postgresql',
'postgresql' !== $this->connection->getDatabasePlatform()->getName(),
'Migration can only be executed safely on \'postgresql\'.'
);
@@ -36,7 +36,7 @@ class Version20150811152608 extends AbstractMigration
public function up(Schema $schema): void
{
$this->abortIf(
$this->connection->getDatabasePlatform()->getName() !== 'postgresql',
'postgresql' !== $this->connection->getDatabasePlatform()->getName(),
'Migration can only be executed safely on \'postgresql\'.'
);

View File

@@ -22,7 +22,7 @@ class Version20150812110708 extends AbstractMigration
public function down(Schema $schema): void
{
$this->abortIf(
$this->connection->getDatabasePlatform()->getName() !== 'postgresql',
'postgresql' !== $this->connection->getDatabasePlatform()->getName(),
'Migration can only be executed safely on \'postgresql\'.'
);
@@ -34,7 +34,7 @@ class Version20150812110708 extends AbstractMigration
public function up(Schema $schema): void
{
$this->abortIf(
$this->connection->getDatabasePlatform()->getName() !== 'postgresql',
'postgresql' !== $this->connection->getDatabasePlatform()->getName(),
'Migration can only be executed safely on \'postgresql\'.'
);

View File

@@ -23,7 +23,7 @@ class Version20150820113409 extends AbstractMigration
public function down(Schema $schema): void
{
$this->abortIf(
$this->connection->getDatabasePlatform()->getName() !== 'postgresql',
'postgresql' !== $this->connection->getDatabasePlatform()->getName(),
'Migration can only be executed safely on \'postgresql\'.'
);
@@ -35,7 +35,7 @@ class Version20150820113409 extends AbstractMigration
public function up(Schema $schema): void
{
$this->abortIf(
$this->connection->getDatabasePlatform()->getName() !== 'postgresql',
'postgresql' !== $this->connection->getDatabasePlatform()->getName(),
'Migration can only be executed safely on \'postgresql\'.'
);

View File

@@ -21,7 +21,7 @@ class Version20160310161006 extends AbstractMigration
{
public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('DROP TABLE chill_person_persons_to_addresses');
}
@@ -29,23 +29,23 @@ class Version20160310161006 extends AbstractMigration
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('CREATE TABLE chill_person_persons_to_addresses ('
. 'person_id INT NOT NULL, '
. 'address_id INT NOT NULL, '
. 'PRIMARY KEY(person_id, address_id))');
.'person_id INT NOT NULL, '
.'address_id INT NOT NULL, '
.'PRIMARY KEY(person_id, address_id))');
$this->addSql('CREATE INDEX IDX_4655A196217BBB47 '
. 'ON chill_person_persons_to_addresses (person_id)');
.'ON chill_person_persons_to_addresses (person_id)');
$this->addSql('CREATE INDEX IDX_4655A196F5B7AF75 '
. 'ON chill_person_persons_to_addresses (address_id)');
.'ON chill_person_persons_to_addresses (address_id)');
$this->addSql('ALTER TABLE chill_person_persons_to_addresses '
. 'ADD CONSTRAINT FK_4655A196217BBB47 '
. 'FOREIGN KEY (person_id) '
. 'REFERENCES Person (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
.'ADD CONSTRAINT FK_4655A196217BBB47 '
.'FOREIGN KEY (person_id) '
.'REFERENCES Person (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE chill_person_persons_to_addresses '
. 'ADD CONSTRAINT FK_4655A196F5B7AF75 '
. 'FOREIGN KEY (address_id) '
. 'REFERENCES chill_main_address (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
.'ADD CONSTRAINT FK_4655A196F5B7AF75 '
.'FOREIGN KEY (address_id) '
.'REFERENCES chill_main_address (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
}
}

View File

@@ -14,8 +14,6 @@ namespace Chill\Migrations\Person;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
use function count;
/**
* Check if each person do not have multiple addresses with the same valideFrom.
*/
@@ -34,11 +32,11 @@ class Version20160422000000 extends AbstractMigration
$personWithTwoAddressWithSameValidFrom = $stmt->fetchAll();
foreach ($personWithTwoAddressWithSameValidFrom as $p) {
$this->warnIf(true, 'The person with id ' . $p['id'] . ' has two adresses with the same validFrom date');
$this->warnIf(true, 'The person with id '.$p['id'].' has two adresses with the same validFrom date');
}
$this->abortIf(
count($personWithTwoAddressWithSameValidFrom) !== 0,
0 !== \count($personWithTwoAddressWithSameValidFrom),
'There exists some person with multiple adress with the same validFrom'
);
}

View File

@@ -21,7 +21,7 @@ final class Version20180518144221 extends AbstractMigration
{
public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE chill_person_person DROP contactInfo');
$this->addSql('ALTER TABLE chill_person_person DROP mobilenumber');
@@ -30,7 +30,7 @@ final class Version20180518144221 extends AbstractMigration
public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE chill_person_person ADD contactInfo TEXT DEFAULT NULL');
$this->addSql('ALTER TABLE chill_person_person ADD mobilenumber TEXT DEFAULT NULL');

View File

@@ -23,7 +23,7 @@ final class Version20180820120000 extends AbstractMigration
{
public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('UPDATE chill_person_person SET email=contactInfo');
$this->addSql('UPDATE chill_person_person SET contactInfo=\'\'');
@@ -31,7 +31,7 @@ final class Version20180820120000 extends AbstractMigration
public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('UPDATE chill_person_person SET contactInfo=email');
$this->addSql('UPDATE chill_person_person SET email=\'\'');

View File

@@ -21,14 +21,14 @@ final class Version20181005140249 extends AbstractMigration
{
public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE chill_person_person ALTER gender SET NOT NULL');
}
public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE chill_person_person ALTER gender DROP NOT NULL');
}

View File

@@ -21,7 +21,7 @@ final class Version20181023101621 extends AbstractMigration
{
public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('DROP INDEX fullnameCanonical_trgm_idx');
$this->addSql('ALTER TABLE chill_person_person DROP fullnameCanonical');
@@ -33,7 +33,7 @@ final class Version20181023101621 extends AbstractMigration
public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql("ALTER TABLE chill_person_person ADD fullnameCanonical VARCHAR(255) DEFAULT '' ");
$this->addSql("UPDATE chill_person_person SET fullnameCanonical=LOWER(UNACCENT(CONCAT(firstname, ' ', lastname)))");

View File

@@ -21,7 +21,7 @@ final class Version20200128084445 extends AbstractMigration
{
public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('DROP INDEX IDX_2628668E217BBB47');
$this->addSql('DROP TABLE chill_person_alt_name');
@@ -30,7 +30,7 @@ final class Version20200128084445 extends AbstractMigration
public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('CREATE SEQUENCE chill_person_alt_name_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE TABLE chill_person_alt_name (id INT NOT NULL, person_id INT DEFAULT NULL, key VARCHAR(255) NOT NULL, label TEXT NOT NULL, PRIMARY KEY(id))');

View File

@@ -21,7 +21,7 @@ final class Version20200310090632 extends AbstractMigration
{
public function down(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE chill_person_closingmotive DROP parent_id');
$this->addSql('ALTER TABLE chill_person_closingmotive DROP ordering');
@@ -29,7 +29,7 @@ final class Version20200310090632 extends AbstractMigration
public function up(Schema $schema): void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE chill_person_closingmotive ADD parent_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE chill_person_closingmotive ADD CONSTRAINT FK_92351ECE727ACA70 FOREIGN KEY (parent_id) REFERENCES chill_person_closingmotive (id) NOT DEFERRABLE INITIALLY IMMEDIATE');

View File

@@ -35,12 +35,12 @@ final class Version20210326113045 extends AbstractMigration
// insert datas in existing table
$this->addSql('UPDATE chill_person_accompanying_period AS ap '
. 'SET person_id = jt.person_id '
. 'FROM ( '
. 'SELECT DISTINCT ON (accompanyingperiod_id) accompanyingperiod_id AS id, person_id FROM persons_accompanying_periods '
. 'ORDER BY id, person_id ASC '
. ') AS jt '
. 'WHERE ap.id = jt.id');
.'SET person_id = jt.person_id '
.'FROM ( '
.'SELECT DISTINCT ON (accompanyingperiod_id) accompanyingperiod_id AS id, person_id FROM persons_accompanying_periods '
.'ORDER BY id, person_id ASC '
.') AS jt '
.'WHERE ap.id = jt.id');
// drop join table
$this->addSql('DROP TABLE persons_accompanying_periods');
@@ -65,7 +65,7 @@ final class Version20210326113045 extends AbstractMigration
// insert datas in new join table
$this->addSql('INSERT INTO persons_accompanying_periods (person_id, accompanyingperiod_id) '
. 'SELECT person_id, id as accompagnying_period_id FROM chill_person_accompanying_period WHERE person_id IS NOT NULL');
.'SELECT person_id, id as accompagnying_period_id FROM chill_person_accompanying_period WHERE person_id IS NOT NULL');
// drop column
$this->addSql('DROP INDEX idx_64a4a621217bbb47');

View File

@@ -22,7 +22,7 @@ final class Version20210419105054 extends AbstractMigration
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE chill_person_accompanying_period_closingmotive_id_seq '
. 'RENAME TO chill_person_closingmotive_id_seq');
.'RENAME TO chill_person_closingmotive_id_seq');
}
public function getDescription(): string
@@ -33,6 +33,6 @@ final class Version20210419105054 extends AbstractMigration
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE chill_person_closingmotive_id_seq RENAME TO '
. 'chill_person_accompanying_period_closingmotive_id_seq');
.'chill_person_accompanying_period_closingmotive_id_seq');
}
}

View File

@@ -23,9 +23,9 @@ final class Version20210419105940 extends AbstractMigration
{
// this will keep the '"' at first and last character, but is acceptable
$this->addSql('ALTER TABLE chill_person_accompanying_period_origin '
. 'ALTER label TYPE VARCHAR(255) USING label->\'fr\'::text');
.'ALTER label TYPE VARCHAR(255) USING label->\'fr\'::text');
$this->addSql('ALTER TABLE chill_person_accompanying_period_origin '
. 'ALTER label DROP DEFAULT');
.'ALTER label DROP DEFAULT');
}
public function getDescription(): string
@@ -36,8 +36,8 @@ final class Version20210419105940 extends AbstractMigration
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE chill_person_accompanying_period_origin '
. 'ALTER label TYPE JSON USING json_build_object(\'fr\', label)::jsonb');
.'ALTER label TYPE JSON USING json_build_object(\'fr\', label)::jsonb');
$this->addSql('ALTER TABLE chill_person_accompanying_period_origin '
. 'ALTER label DROP DEFAULT');
.'ALTER label DROP DEFAULT');
}
}

View File

@@ -49,7 +49,7 @@ final class Version20210528092625 extends AbstractMigration
// create constraint 'householdmembers not overlaps'
$this->addSql('ALTER TABLE chill_person_household_members ADD CHECK (startdate < enddate)');
$this->addSql('ALTER TABLE chill_person_household_members ADD CONSTRAINT ' .
$this->addSql('ALTER TABLE chill_person_household_members ADD CONSTRAINT '.
'household_members_not_overlaps EXCLUDE USING GIST(
-- extension btree_gist required to include comparaison with integer
person_id WITH =,

View File

@@ -32,18 +32,18 @@ final class Version20210616102900 extends AbstractMigration
public function up(Schema $schema): void
{
$this->addSql(
'CREATE VIEW view_chill_person_household_address AS ' .
'SELECT ' .
'members.person_id AS person_id, ' .
'members.household_id AS household_id, ' .
'members.id AS member_id, ' .
'address.id AS address_id, ' .
'CASE WHEN address.validFrom < members.startDate THEN members.startDate ELSE address.validFrom END AS validFrom, ' .
"CASE WHEN COALESCE(address.validTo, 'infinity') < COALESCE(members.endDate, 'infinity') THEN address.validTo ELSE members.endDate END AS validTo " .
'FROM chill_person_household_members AS members ' .
'JOIN chill_person_household_to_addresses AS household_to_addr ON household_to_addr.household_id = members.household_id ' .
'JOIN chill_main_address AS address ON household_to_addr.address_id = address.id ' .
'AND daterange(address.validFrom, address.validTo) && daterange(members.startDate, members.endDate) ' .
'CREATE VIEW view_chill_person_household_address AS '.
'SELECT '.
'members.person_id AS person_id, '.
'members.household_id AS household_id, '.
'members.id AS member_id, '.
'address.id AS address_id, '.
'CASE WHEN address.validFrom < members.startDate THEN members.startDate ELSE address.validFrom END AS validFrom, '.
"CASE WHEN COALESCE(address.validTo, 'infinity') < COALESCE(members.endDate, 'infinity') THEN address.validTo ELSE members.endDate END AS validTo ".
'FROM chill_person_household_members AS members '.
'JOIN chill_person_household_to_addresses AS household_to_addr ON household_to_addr.household_id = members.household_id '.
'JOIN chill_main_address AS address ON household_to_addr.address_id = address.id '.
'AND daterange(address.validFrom, address.validTo) && daterange(members.startDate, members.endDate) '.
'WHERE members.sharedhousehold IS TRUE '
);
}

View File

@@ -32,7 +32,7 @@ final class Version20211021125359 extends AbstractMigration
public function up(Schema $schema): void
{
// creates a constraint 'participations may not overlap'
$this->addSql('ALTER TABLE chill_person_accompanying_period_participation ADD CONSTRAINT ' .
$this->addSql('ALTER TABLE chill_person_accompanying_period_participation ADD CONSTRAINT '.
'participations_no_overlap EXCLUDE USING GIST(
-- extension btree_gist required to include comparaison with integer
person_id WITH =, accompanyingperiod_id WITH =,

View File

@@ -40,7 +40,7 @@ final class Version20211213203147 extends AbstractMigration
$this->addSql('ALTER TABLE chill_person_social_work_evaluation_action ADD CONSTRAINT FK_DF34CCFB456C5646 FOREIGN KEY (evaluation_id) REFERENCES chill_person_social_work_evaluation (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE chill_person_social_work_evaluation_action ADD CONSTRAINT FK_DF34CCFB3DC32179 FOREIGN KEY (socialaction_id) REFERENCES chill_person_social_action (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('INSERT INTO chill_person_social_work_evaluation_action (evaluation_id, socialaction_id) ' .
$this->addSql('INSERT INTO chill_person_social_work_evaluation_action (evaluation_id, socialaction_id) '.
'SELECT id, socialaction_ID FROM chill_person_social_work_evaluation');
$this->addSql('ALTER TABLE chill_person_social_work_evaluation DROP CONSTRAINT fk_2e23f3febf32a3da');

View File

@@ -38,7 +38,7 @@ final class Version20220128133039 extends AbstractMigration
$this->addSql('ALTER TABLE chill_person_accompanying_period_user_history ADD CONSTRAINT FK_6C258C49D7FA8EF0 FOREIGN KEY (accompanyingPeriod_id) REFERENCES chill_person_accompanying_period (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE chill_person_accompanying_period_user_history ADD CONSTRAINT FK_6C258C49A76ED395 FOREIGN KEY (user_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE chill_person_accompanying_period_user_history ADD CHECK (startdate <= enddate)');
$this->addSql('INSERT INTO chill_person_accompanying_period_user_history (id, user_id, accompanyingperiod_id, startDate, endDate) ' .
$this->addSql('INSERT INTO chill_person_accompanying_period_user_history (id, user_id, accompanyingperiod_id, startDate, endDate) '.
'SELECT nextval(\'chill_person_accompanying_period_user_history_id_seq\'), user_id, id, openingDate, null FROM chill_person_accompanying_period WHERE user_id IS NOT NULL');
$this->addSql('ALTER TABLE chill_person_accompanying_period_user_history ADD createdAt TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL;');
$this->addSql('ALTER TABLE chill_person_accompanying_period_user_history ADD createdBy_id INT DEFAULT NULL;');

View File

@@ -13,9 +13,7 @@ namespace Chill\Migrations\Person;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
use Exception;
use libphonenumber\PhoneNumberUtil;
use RuntimeException;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
@@ -25,7 +23,7 @@ final class Version20220215135509 extends AbstractMigration implements Container
public function down(Schema $schema): void
{
throw new Exception('You should not do that.');
throw new \Exception('You should not do that.');
}
public function getDescription(): string
@@ -39,7 +37,7 @@ final class Version20220215135509 extends AbstractMigration implements Container
->getParameter('chill_main')['phone_helper']['default_carrier_code'];
if (null === $carrier_code) {
throw new RuntimeException('no carrier code');
throw new \RuntimeException('no carrier code');
}
$this->addSql('ALTER TABLE chill_person_person ALTER phonenumber TYPE TEXT');
@@ -53,9 +51,9 @@ final class Version20220215135509 extends AbstractMigration implements Container
$this->addSql('COMMENT ON COLUMN chill_person_person.mobilenumber IS NULL');
$this->addSql(
'UPDATE chill_person_person SET ' .
$this->buildMigrationPhonenumberClause($carrier_code, 'phonenumber') .
', ' .
'UPDATE chill_person_person SET '.
$this->buildMigrationPhonenumberClause($carrier_code, 'phonenumber').
', '.
$this->buildMigrationPhoneNumberClause($carrier_code, 'mobilenumber')
);
@@ -65,7 +63,7 @@ final class Version20220215135509 extends AbstractMigration implements Container
$this->addSql('COMMENT ON COLUMN chill_person_phone.phonenumber IS NULL');
$this->addSql(
'UPDATE chill_person_phone SET ' .
'UPDATE chill_person_phone SET '.
$this->buildMigrationPhoneNumberClause($carrier_code, 'phonenumber')
);
}

View File

@@ -51,7 +51,7 @@ final class Version20220926154347 extends AbstractMigration
// check consistency of history on database side
$this->addSql('ALTER TABLE chill_person_person_center_history ADD CHECK (startdate <= enddate)');
$this->addSql('ALTER TABLE chill_person_person_center_history ADD CONSTRAINT ' .
$this->addSql('ALTER TABLE chill_person_person_center_history ADD CONSTRAINT '.
'chill_internal_person_person_center_history_not_overlaps EXCLUDE USING GIST(
-- extension btree_gist required to include comparaison with integer
person_id WITH =,

View File

@@ -37,7 +37,7 @@ final class Version20221014115500 extends AbstractMigration
');
$this->addSql('ALTER TABLE chill_person_accompanying_period_step_history ADD CHECK (startDate <= endDate)');
$this->addSql('ALTER TABLE chill_person_accompanying_period_step_history ADD CONSTRAINT ' .
$this->addSql('ALTER TABLE chill_person_accompanying_period_step_history ADD CONSTRAINT '.
'chill_internal_acp_steps_not_overlaps EXCLUDE USING GIST(
-- extension btree_gist required to include comparaison with integer
period_id WITH =,

View File

@@ -15,7 +15,7 @@ use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Add isCanceledAccompanyingPeriod property to ClosingMotive
* Add isCanceledAccompanyingPeriod property to ClosingMotive.
*/
final class Version20230918115305 extends AbstractMigration
{