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,18 +1,51 @@
<?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\Event;
use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Initialize the bundle chill_event
* Initialize the bundle chill_event.
*/
class Version20160318111334 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function down(Schema $schema): void
{
// this down() 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->addSql('ALTER TABLE chill_event_role DROP CONSTRAINT FK_AA714E54C54C8C93');
$this->addSql('ALTER TABLE chill_event_status DROP CONSTRAINT FK_A6CC85D0C54C8C93');
$this->addSql('ALTER TABLE chill_event_participation DROP CONSTRAINT FK_4E7768ACD60322AC');
$this->addSql('ALTER TABLE chill_event_participation DROP CONSTRAINT FK_4E7768AC6BF700BD');
$this->addSql('ALTER TABLE chill_event_participation DROP CONSTRAINT FK_4E7768AC71F7E88B');
// drop center_id constraint
$this->addSql('ALTER TABLE chill_event_event DROP CONSTRAINT FK_FA320FC85932F377');
// drop type_id constraint
$this->addSql('ALTER TABLE chill_event_event DROP CONSTRAINT FK_FA320FC8C54C8C93');
// drop circle_id constraint
$this->addSql('ALTER TABLE chill_event_event DROP CONSTRAINT FK_FA320FC870EE2FF6');
$this->addSql('DROP SEQUENCE chill_event_event_type_id_seq CASCADE');
$this->addSql('DROP SEQUENCE chill_event_role_id_seq CASCADE');
$this->addSql('DROP SEQUENCE chill_event_status_id_seq CASCADE');
$this->addSql('DROP SEQUENCE chill_event_event_id_seq CASCADE');
$this->addSql('DROP SEQUENCE chill_event_participation_id_seq CASCADE');
$this->addSql('DROP TABLE chill_event_event_type');
$this->addSql('DROP TABLE chill_event_role');
$this->addSql('DROP TABLE chill_event_status');
$this->addSql('DROP TABLE chill_event_event');
$this->addSql('DROP TABLE chill_event_participation');
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
@@ -62,7 +95,7 @@ class Version20160318111334 extends AbstractMigration
$this->addSql('CREATE INDEX IDX_FA320FC85932F377 ON chill_event_event (center_id)');
$this->addSql('CREATE INDEX IDX_FA320FC8C54C8C93 ON chill_event_event (type_id)');
$this->addSql('CREATE INDEX IDX_FA320FC870EE2FF6 ON chill_event_event (circle_id)');
$this->addSql('ALTER TABLE chill_event_event '
. 'ADD CONSTRAINT FK_FA320FC85932F377 FOREIGN KEY (center_id) '
. 'REFERENCES centers (id) '
@@ -103,39 +136,5 @@ class Version20160318111334 extends AbstractMigration
. 'FOREIGN KEY (status_id) '
. 'REFERENCES chill_event_status (id) '
. 'NOT DEFERRABLE INITIALLY IMMEDIATE');
}
/**
* @param Schema $schema
*/
public function down(Schema $schema): void
{
// this down() 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->addSql('ALTER TABLE chill_event_role DROP CONSTRAINT FK_AA714E54C54C8C93');
$this->addSql('ALTER TABLE chill_event_status DROP CONSTRAINT FK_A6CC85D0C54C8C93');
$this->addSql('ALTER TABLE chill_event_participation DROP CONSTRAINT FK_4E7768ACD60322AC');
$this->addSql('ALTER TABLE chill_event_participation DROP CONSTRAINT FK_4E7768AC6BF700BD');
$this->addSql('ALTER TABLE chill_event_participation DROP CONSTRAINT FK_4E7768AC71F7E88B');
// drop center_id constraint
$this->addSql('ALTER TABLE chill_event_event DROP CONSTRAINT FK_FA320FC85932F377');
// drop type_id constraint
$this->addSql('ALTER TABLE chill_event_event DROP CONSTRAINT FK_FA320FC8C54C8C93');
// drop circle_id constraint
$this->addSql('ALTER TABLE chill_event_event DROP CONSTRAINT FK_FA320FC870EE2FF6');
$this->addSql('DROP SEQUENCE chill_event_event_type_id_seq CASCADE');
$this->addSql('DROP SEQUENCE chill_event_role_id_seq CASCADE');
$this->addSql('DROP SEQUENCE chill_event_status_id_seq CASCADE');
$this->addSql('DROP SEQUENCE chill_event_event_id_seq CASCADE');
$this->addSql('DROP SEQUENCE chill_event_participation_id_seq CASCADE');
$this->addSql('DROP TABLE chill_event_event_type');
$this->addSql('DROP TABLE chill_event_role');
$this->addSql('DROP TABLE chill_event_status');
$this->addSql('DROP TABLE chill_event_event');
$this->addSql('DROP TABLE chill_event_participation');
}
}