diff --git a/Resources/migrations/Version20141128194409.php b/migrations/Version20141128194409.php similarity index 97% rename from Resources/migrations/Version20141128194409.php rename to migrations/Version20141128194409.php index fe44997f7..6731826a4 100644 --- a/Resources/migrations/Version20141128194409.php +++ b/migrations/Version20141128194409.php @@ -2,7 +2,7 @@ namespace Application\Migrations; -use Doctrine\DBAL\Migrations\AbstractMigration; +use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; /** @@ -10,7 +10,7 @@ use Doctrine\DBAL\Schema\Schema; */ class Version20141128194409 extends AbstractMigration { - public function up(Schema $schema) + public function up(Schema $schema): void { $this->addSql("CREATE TABLE Country (id INT NOT NULL, name JSON NOT NULL, countryCode VARCHAR(3) NOT NULL, PRIMARY KEY(id));"); $this->addSql("CREATE TABLE centers (id INT NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY(id));"); @@ -48,7 +48,7 @@ class Version20141128194409 extends AbstractMigration $this->addSql("ALTER TABLE user_groupcenter ADD CONSTRAINT FK_33FFE54A7EC2FA68 FOREIGN KEY (groupcenter_id) REFERENCES group_centers (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE;"); } - public function down(Schema $schema) + public function down(Schema $schema): void { // this down() migration is auto-generated, please modify it to your needs diff --git a/Resources/migrations/Version20150821105642.php b/migrations/Version20150821105642.php similarity index 90% rename from Resources/migrations/Version20150821105642.php rename to migrations/Version20150821105642.php index 211532c93..3880178b1 100644 --- a/Resources/migrations/Version20150821105642.php +++ b/migrations/Version20150821105642.php @@ -2,7 +2,7 @@ namespace Application\Migrations; -use Doctrine\DBAL\Migrations\AbstractMigration; +use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; use Symfony\Component\DependencyInjection\ContainerInterface; use Doctrine\ORM\Query\ResultSetMapping; @@ -28,7 +28,7 @@ class Version20150821105642 extends AbstractMigration implements /** * @param Schema $schema */ - public function up(Schema $schema) + 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\'.'); @@ -39,8 +39,20 @@ class Version20150821105642 extends AbstractMigration implements } - public function postUp(Schema $schema) + public function postUp(Schema $schema): void { + /* + * Before the upgrade to symfony version 4, this code worked. + * + * But it doesn't work any more after the migration and currently this + * code should note be necessary. + * + * This code is kept for reference, and may be re-activated if needed, but + * the probability that this will happens is near 0 + */ + return; + + //transform data from groupcenter_permissionsgroup table $em = $this->container->get('doctrine.orm.entity_manager'); @@ -110,7 +122,7 @@ class Version20150821105642 extends AbstractMigration implements /** * @param Schema $schema */ - public function down(Schema $schema) + public function down(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); diff --git a/Resources/migrations/Version20150821122935.php b/migrations/Version20150821122935.php similarity index 91% rename from Resources/migrations/Version20150821122935.php rename to migrations/Version20150821122935.php index 38a4f1b5f..9e290c9df 100644 --- a/Resources/migrations/Version20150821122935.php +++ b/migrations/Version20150821122935.php @@ -2,7 +2,7 @@ namespace Application\Migrations; -use Doctrine\DBAL\Migrations\AbstractMigration; +use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; /** @@ -14,7 +14,7 @@ class Version20150821122935 extends AbstractMigration /** * @param Schema $schema */ - public function up(Schema $schema) + public function up(Schema $schema): void { $this->addSql('DROP TABLE groupcenter_permissionsgroup'); @@ -25,7 +25,7 @@ class Version20150821122935 extends AbstractMigration /** * @param Schema $schema */ - public function down(Schema $schema) + public function down(Schema $schema): void { $this->addSql('ALTER TABLE group_centers ALTER permissionsGroup_id SET DEFAULT NULL'); $this->addSql('CREATE TABLE groupcenter_permissionsgroup (groupcenter_id INT NOT NULL, permissionsgroup_id INT NOT NULL, PRIMARY KEY(groupcenter_id, permissionsgroup_id))'); diff --git a/Resources/migrations/Version20160310122322.php b/migrations/Version20160310122322.php similarity index 94% rename from Resources/migrations/Version20160310122322.php rename to migrations/Version20160310122322.php index 566dc7f79..7e4b9d95f 100644 --- a/Resources/migrations/Version20160310122322.php +++ b/migrations/Version20160310122322.php @@ -2,7 +2,7 @@ namespace Application\Migrations; -use Doctrine\DBAL\Migrations\AbstractMigration; +use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; /** @@ -13,7 +13,7 @@ class Version20160310122322 extends AbstractMigration /** * @param Schema $schema */ - public function up(Schema $schema) + public function up(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); @@ -52,7 +52,7 @@ class Version20160310122322 extends AbstractMigration /** * @param Schema $schema */ - public function down(Schema $schema) + public function down(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); diff --git a/Resources/migrations/Version20180703191509.php b/migrations/Version20180703191509.php similarity index 87% rename from Resources/migrations/Version20180703191509.php rename to migrations/Version20180703191509.php index 82117de9d..03f13a532 100644 --- a/Resources/migrations/Version20180703191509.php +++ b/migrations/Version20180703191509.php @@ -2,7 +2,7 @@ namespace Application\Migrations; -use Doctrine\DBAL\Migrations\AbstractMigration; +use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; /** @@ -10,7 +10,7 @@ use Doctrine\DBAL\Schema\Schema; */ final class Version20180703191509 extends AbstractMigration { - public function up(Schema $schema) : void + public function up(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); @@ -23,7 +23,7 @@ final class Version20180703191509 extends AbstractMigration } - public function down(Schema $schema) : void + public function down(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); diff --git a/Resources/migrations/Version20180709181423.php b/migrations/Version20180709181423.php similarity index 95% rename from Resources/migrations/Version20180709181423.php rename to migrations/Version20180709181423.php index 93ca04e12..40b9f853f 100644 --- a/Resources/migrations/Version20180709181423.php +++ b/migrations/Version20180709181423.php @@ -2,7 +2,7 @@ namespace Application\Migrations; -use Doctrine\DBAL\Migrations\AbstractMigration; +use Doctrine\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; /** @@ -11,7 +11,7 @@ use Doctrine\DBAL\Schema\Schema; */ final class Version20180709181423 extends AbstractMigration { - public function up(Schema $schema) : void + public function up(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); @@ -69,7 +69,7 @@ SQL ); } - public function down(Schema $schema) : void + public function down(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); diff --git a/Resources/migrations/Version20180905101426.php b/migrations/Version20180905101426.php similarity index 87% rename from Resources/migrations/Version20180905101426.php rename to migrations/Version20180905101426.php index 2f7d1afc2..e8aafd57b 100644 --- a/Resources/migrations/Version20180905101426.php +++ b/migrations/Version20180905101426.php @@ -10,14 +10,14 @@ use Doctrine\Migrations\AbstractMigration; */ final class Version20180905101426 extends AbstractMigration { - public function up(Schema $schema) : void + public function up(Schema $schema): void { $this->addSql('ALTER TABLE permission_groups ADD flags JSONB DEFAULT \'[]\' NOT NULL'); $this->addSql('ALTER TABLE group_centers ALTER permissionsgroup_id DROP NOT NULL'); } - public function down(Schema $schema) : void + public function down(Schema $schema): void { $this->addSql('ALTER TABLE permission_groups DROP COLUMN flags'); $this->addSql('ALTER TABLE group_centers ALTER permissionsgroup_id SET DEFAULT NULL'); diff --git a/Resources/migrations/Version20180911093642.php b/migrations/Version20180911093642.php similarity index 91% rename from Resources/migrations/Version20180911093642.php rename to migrations/Version20180911093642.php index 09031278d..c2fefa5f3 100644 --- a/Resources/migrations/Version20180911093642.php +++ b/migrations/Version20180911093642.php @@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration; */ final class Version20180911093642 extends AbstractMigration { - public function up(Schema $schema) : void + public function up(Schema $schema): void { $this->addSql("DROP TRIGGER canonicalize_user_on_update ON users"); @@ -26,7 +26,7 @@ SQL } - public function down(Schema $schema) : void + public function down(Schema $schema): void { $this->addSql("DROP TRIGGER canonicalize_user_on_update ON users"); diff --git a/Resources/migrations/Version20200422122715.php b/migrations/Version20200422122715.php similarity index 83% rename from Resources/migrations/Version20200422122715.php rename to migrations/Version20200422122715.php index 2ce63b41a..4f5b58105 100644 --- a/Resources/migrations/Version20200422122715.php +++ b/migrations/Version20200422122715.php @@ -10,12 +10,12 @@ use Doctrine\Migrations\AbstractMigration; */ final class Version20200422122715 extends AbstractMigration { - public function up(Schema $schema) : void + public function up(Schema $schema): void { $this->addSql('ALTER TABLE chill_main_address ADD isNoAddress BOOLEAN NOT NULL DEFAULT FALSE'); } - public function down(Schema $schema) : void + public function down(Schema $schema): void { $this->addSql('ALTER TABLE chill_main_address DROP isNoAddress'); }