From 0b5be0419b338da379160058a2147fc376698c5a Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 24 Apr 2024 12:27:23 +0200 Subject: [PATCH] Move old migrations to directory 'old' just in case --- .../src/migrations/{ => old}/Version20191119172511.php | 1 + .../src/migrations/{ => old}/Version20191129112321.php | 1 + .../src/migrations/{ => old}/Version20200113104411.php | 10 ++++++++++ .../src/migrations/{ => old}/Version20200113142525.php | 1 + .../src/migrations/{ => old}/Version20200114081435.php | 1 + .../src/migrations/{ => old}/Version20200124130244.php | 1 + .../src/migrations/{ => old}/Version20200124132321.php | 1 + .../src/migrations/{ => old}/Version20200127132932.php | 1 + .../src/migrations/{ => old}/Version20200205132532.php | 6 ++++-- .../src/migrations/{ => old}/Version20200207224152.php | 1 + .../src/migrations/{ => old}/Version20200210105342.php | 1 + .../src/migrations/{ => old}/Version20200313124323.php | 2 +- .../src/migrations/{ => old}/Version20200403114520.php | 1 + .../src/migrations/{ => old}/Version20200403123148.php | 1 + 14 files changed, 26 insertions(+), 3 deletions(-) rename src/Bundle/ChillJobBundle/src/migrations/{ => old}/Version20191119172511.php (98%) rename src/Bundle/ChillJobBundle/src/migrations/{ => old}/Version20191129112321.php (96%) rename src/Bundle/ChillJobBundle/src/migrations/{ => old}/Version20200113104411.php (74%) rename src/Bundle/ChillJobBundle/src/migrations/{ => old}/Version20200113142525.php (93%) rename src/Bundle/ChillJobBundle/src/migrations/{ => old}/Version20200114081435.php (94%) rename src/Bundle/ChillJobBundle/src/migrations/{ => old}/Version20200124130244.php (90%) rename src/Bundle/ChillJobBundle/src/migrations/{ => old}/Version20200124132321.php (90%) rename src/Bundle/ChillJobBundle/src/migrations/{ => old}/Version20200127132932.php (90%) rename src/Bundle/ChillJobBundle/src/migrations/{ => old}/Version20200205132532.php (95%) rename src/Bundle/ChillJobBundle/src/migrations/{ => old}/Version20200207224152.php (92%) rename src/Bundle/ChillJobBundle/src/migrations/{ => old}/Version20200210105342.php (91%) rename src/Bundle/ChillJobBundle/src/migrations/{ => old}/Version20200313124323.php (98%) rename src/Bundle/ChillJobBundle/src/migrations/{ => old}/Version20200403114520.php (91%) rename src/Bundle/ChillJobBundle/src/migrations/{ => old}/Version20200403123148.php (87%) diff --git a/src/Bundle/ChillJobBundle/src/migrations/Version20191119172511.php b/src/Bundle/ChillJobBundle/src/migrations/old/Version20191119172511.php similarity index 98% rename from src/Bundle/ChillJobBundle/src/migrations/Version20191119172511.php rename to src/Bundle/ChillJobBundle/src/migrations/old/Version20191119172511.php index 0bc03da06..cf4b17d17 100644 --- a/src/Bundle/ChillJobBundle/src/migrations/Version20191119172511.php +++ b/src/Bundle/ChillJobBundle/src/migrations/old/Version20191119172511.php @@ -21,6 +21,7 @@ final class Version20191119172511 extends AbstractMigration { public function up(Schema $schema): void { + $this->skipIf(true, 'Skipping this old migration. Replaced by migration Version20240424095147'); $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('CREATE SCHEMA chill_csconnectes'); diff --git a/src/Bundle/ChillJobBundle/src/migrations/Version20191129112321.php b/src/Bundle/ChillJobBundle/src/migrations/old/Version20191129112321.php similarity index 96% rename from src/Bundle/ChillJobBundle/src/migrations/Version20191129112321.php rename to src/Bundle/ChillJobBundle/src/migrations/old/Version20191129112321.php index 361c68207..85ca4e137 100644 --- a/src/Bundle/ChillJobBundle/src/migrations/Version20191129112321.php +++ b/src/Bundle/ChillJobBundle/src/migrations/old/Version20191129112321.php @@ -21,6 +21,7 @@ final class Version20191129112321 extends AbstractMigration { public function up(Schema $schema): void { + $this->skipIf(true, 'Skipping this old migration. Replaced by migration Version20240424095147'); $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('DROP INDEX chill_csconnectes.IDX_10864f31217bbb47'); diff --git a/src/Bundle/ChillJobBundle/src/migrations/Version20200113104411.php b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200113104411.php similarity index 74% rename from src/Bundle/ChillJobBundle/src/migrations/Version20200113104411.php rename to src/Bundle/ChillJobBundle/src/migrations/old/Version20200113104411.php index 57228f5b6..e4ed9436e 100644 --- a/src/Bundle/ChillJobBundle/src/migrations/Version20200113104411.php +++ b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200113104411.php @@ -21,6 +21,7 @@ final class Version20200113104411 extends AbstractMigration { public function up(Schema $schema): void { + $this->skipIf(true, 'Skipping this old migration. Replaced by migration Version20240424095147'); $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('CREATE SEQUENCE chill_csconnectes.immersion_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); @@ -32,6 +33,11 @@ final class Version20200113104411 extends AbstractMigration $this->addSql('ALTER TABLE chill_csconnectes.immersion ADD CONSTRAINT FK_FBB3CBB4217BBB47 FOREIGN KEY (person_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); $this->addSql('ALTER TABLE chill_csconnectes.immersion ADD CONSTRAINT FK_FBB3CBB4A4AEAFEA FOREIGN KEY (entreprise_id) REFERENCES chill_3party.third_party (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); $this->addSql('ALTER TABLE chill_csconnectes.immersion ADD CONSTRAINT FK_FBB3CBB435E47E35 FOREIGN KEY (referent_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + + $this->addSql('CREATE TABLE chill_csconnectes.cv_formation (id INT NOT NULL, title TEXT NOT NULL, startDate DATE DEFAULT NULL, endDate DATE DEFAULT NULL, diplomaObtained VARCHAR(255) DEFAULT NULL, diplomaReconnue VARCHAR(50) DEFAULT NULL, organisme TEXT DEFAULT NULL, CV_id INT DEFAULT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE INDEX IDX_20BE09E2AE1799D8 ON chill_csconnectes.cv_formation (CV_id)'); + $this->addSql('ALTER TABLE chill_csconnectes.cv_formation ADD CONSTRAINT FK_20BE09E2AE1799D8 FOREIGN KEY (CV_id) REFERENCES chill_csconnectes.cv (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + } public function down(Schema $schema): void @@ -40,5 +46,9 @@ final class Version20200113104411 extends AbstractMigration $this->addSql('DROP SEQUENCE chill_csconnectes.immersion_id_seq CASCADE'); $this->addSql('DROP TABLE chill_csconnectes.immersion'); + + $this->addSql('DROP SEQUENCE chill_csconnectes.cv_formation_id_seq CASCADE'); + $this->addSql('ALTER TABLE chill_csconnectes.cv_formation DROP CONSTRAINT FK_20BE09E2AE1799D8'); + $this->addSql('DROP TABLE chill_csconnectes.cv_formation'); } } diff --git a/src/Bundle/ChillJobBundle/src/migrations/Version20200113142525.php b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200113142525.php similarity index 93% rename from src/Bundle/ChillJobBundle/src/migrations/Version20200113142525.php rename to src/Bundle/ChillJobBundle/src/migrations/old/Version20200113142525.php index 03d4c44e6..cabc97d59 100644 --- a/src/Bundle/ChillJobBundle/src/migrations/Version20200113142525.php +++ b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200113142525.php @@ -25,6 +25,7 @@ final class Version20200113142525 extends AbstractMigration { public function up(Schema $schema): void { + $this->skipIf(true, 'Skipping this old migration. Replaced by migration Version20240424095147'); $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('ALTER TABLE chill_csconnectes.immersion ADD structureAccEmail TEXT DEFAULT NULL'); diff --git a/src/Bundle/ChillJobBundle/src/migrations/Version20200114081435.php b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200114081435.php similarity index 94% rename from src/Bundle/ChillJobBundle/src/migrations/Version20200114081435.php rename to src/Bundle/ChillJobBundle/src/migrations/old/Version20200114081435.php index 9d4000b44..a03263bf3 100644 --- a/src/Bundle/ChillJobBundle/src/migrations/Version20200114081435.php +++ b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200114081435.php @@ -24,6 +24,7 @@ final class Version20200114081435 extends AbstractMigration { public function up(Schema $schema): void { + $this->skipIf(true, 'Skipping this old migration. Replaced by migration Version20240424095147'); $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('ALTER TABLE chill_csconnectes.immersion ADD is_bilan_fullfilled BOOLEAN DEFAULT \'false\' NOT NULL'); diff --git a/src/Bundle/ChillJobBundle/src/migrations/Version20200124130244.php b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200124130244.php similarity index 90% rename from src/Bundle/ChillJobBundle/src/migrations/Version20200124130244.php rename to src/Bundle/ChillJobBundle/src/migrations/old/Version20200124130244.php index 1d2e5e4d1..dd1e669ae 100644 --- a/src/Bundle/ChillJobBundle/src/migrations/Version20200124130244.php +++ b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200124130244.php @@ -21,6 +21,7 @@ final class Version20200124130244 extends AbstractMigration { public function up(Schema $schema): void { + $this->skipIf(true, 'Skipping this old migration. Replaced by migration Version20240424095147'); $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('ALTER TABLE chill_csconnectes.cs_person ADD datecontratIEJ DATE DEFAULT NULL'); diff --git a/src/Bundle/ChillJobBundle/src/migrations/Version20200124132321.php b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200124132321.php similarity index 90% rename from src/Bundle/ChillJobBundle/src/migrations/Version20200124132321.php rename to src/Bundle/ChillJobBundle/src/migrations/old/Version20200124132321.php index cd12ef238..3cf1b3019 100644 --- a/src/Bundle/ChillJobBundle/src/migrations/Version20200124132321.php +++ b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200124132321.php @@ -21,6 +21,7 @@ final class Version20200124132321 extends AbstractMigration { public function up(Schema $schema): void { + $this->skipIf(true, 'Skipping this old migration. Replaced by migration Version20240424095147'); $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('ALTER TABLE chill_csconnectes.cs_person ADD typeContratAide TEXT DEFAULT NULL'); diff --git a/src/Bundle/ChillJobBundle/src/migrations/Version20200127132932.php b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200127132932.php similarity index 90% rename from src/Bundle/ChillJobBundle/src/migrations/Version20200127132932.php rename to src/Bundle/ChillJobBundle/src/migrations/old/Version20200127132932.php index 6cf29a7dd..2907c2155 100644 --- a/src/Bundle/ChillJobBundle/src/migrations/Version20200127132932.php +++ b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200127132932.php @@ -21,6 +21,7 @@ final class Version20200127132932 extends AbstractMigration { public function up(Schema $schema): void { + $this->skipIf(true, 'Skipping this old migration. Replaced by migration Version20240424095147'); $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('ALTER TABLE chill_csconnectes.immersion ADD objectifsAutre TEXT DEFAULT NULL'); diff --git a/src/Bundle/ChillJobBundle/src/migrations/Version20200205132532.php b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200205132532.php similarity index 95% rename from src/Bundle/ChillJobBundle/src/migrations/Version20200205132532.php rename to src/Bundle/ChillJobBundle/src/migrations/old/Version20200205132532.php index 495943467..98870f92d 100644 --- a/src/Bundle/ChillJobBundle/src/migrations/Version20200205132532.php +++ b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200205132532.php @@ -21,16 +21,18 @@ final class Version20200205132532 extends AbstractMigration { public function up(Schema $schema): void { - // this up() migration is auto-generated, please modify it to your needs + $this->skipIf(true, 'Skipping this old migration. Replaced by migration Version20240424095147'); $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.'); - $this->addSql('DROP SEQUENCE report_id_seq CASCADE'); +// $this->addSql('DROP SEQUENCE report_id_seq CASCADE'); $this->addSql('CREATE SEQUENCE chill_csconnectes.rome_appellation_id_seq ' .'INCREMENT BY 1 MINVALUE 1 START 1'); $this->addSql('CREATE SEQUENCE chill_csconnectes.rome_metier_id_seq ' .'INCREMENT BY 1 MINVALUE 1 START 1'); $this->addSql('CREATE SEQUENCE chill_csconnectes.projet_professionnel_id_seq ' .'INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE SEQUENCE chill_csconnectes.cv_formation_id_seq ' + . 'INCREMENT BY 1 MINVALUE 1 START 1'); $this->addSql('CREATE TABLE chill_csconnectes.rome_appellation (' .'id INT NOT NULL, metier_id INT DEFAULT NULL, code VARCHAR(40) NOT NULL, ' .'libelle TEXT NOT NULL, PRIMARY KEY(id))'); diff --git a/src/Bundle/ChillJobBundle/src/migrations/Version20200207224152.php b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200207224152.php similarity index 92% rename from src/Bundle/ChillJobBundle/src/migrations/Version20200207224152.php rename to src/Bundle/ChillJobBundle/src/migrations/old/Version20200207224152.php index 9384f5ea5..6fecfda82 100644 --- a/src/Bundle/ChillJobBundle/src/migrations/Version20200207224152.php +++ b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200207224152.php @@ -21,6 +21,7 @@ final class Version20200207224152 extends AbstractMigration { public function up(Schema $schema): void { + $this->skipIf(true, 'Skipping this old migration. Replaced by migration Version20240424095147'); $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('CREATE INDEX code_appellation_idx ON chill_csconnectes.rome_appellation (code)'); diff --git a/src/Bundle/ChillJobBundle/src/migrations/Version20200210105342.php b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200210105342.php similarity index 91% rename from src/Bundle/ChillJobBundle/src/migrations/Version20200210105342.php rename to src/Bundle/ChillJobBundle/src/migrations/old/Version20200210105342.php index dc5dc7fab..53d88ec2b 100644 --- a/src/Bundle/ChillJobBundle/src/migrations/Version20200210105342.php +++ b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200210105342.php @@ -21,6 +21,7 @@ final class Version20200210105342 extends AbstractMigration { public function up(Schema $schema): void { + $this->skipIf(true, 'Skipping this old migration. Replaced by migration Version20240424095147'); $this->addSql('CREATE UNIQUE INDEX UNIQ_D9E9CABC77153098 ON chill_csconnectes.rome_appellation (code);'); $this->addSql('CREATE UNIQUE INDEX UNIQ_3274952577153098 ON chill_csconnectes.rome_metier (code);'); $this->addSql('DROP INDEX IF EXISTS chill_csconnectes.code_metier_idx '); diff --git a/src/Bundle/ChillJobBundle/src/migrations/Version20200313124323.php b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200313124323.php similarity index 98% rename from src/Bundle/ChillJobBundle/src/migrations/Version20200313124323.php rename to src/Bundle/ChillJobBundle/src/migrations/old/Version20200313124323.php index de2dbafab..1c3ef3be4 100644 --- a/src/Bundle/ChillJobBundle/src/migrations/Version20200313124323.php +++ b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200313124323.php @@ -21,8 +21,8 @@ final class Version20200313124323 extends AbstractMigration { public function up(Schema $schema): void { + $this->skipIf(true, 'Skipping this old migration. Replaced by migration Version20240424095147'); $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.'); - $this->addSql('ALTER TABLE chill_csconnectes.cv_formation ALTER diplomaobtained TYPE VARCHAR(255)'); $this->addSql('ALTER TABLE chill_csconnectes.immersion ADD ponctualite_salarie TEXT DEFAULT NULL'); $this->addSql('ALTER TABLE chill_csconnectes.immersion ADD ponctualite_salarie_note TEXT DEFAULT NULL'); diff --git a/src/Bundle/ChillJobBundle/src/migrations/Version20200403114520.php b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200403114520.php similarity index 91% rename from src/Bundle/ChillJobBundle/src/migrations/Version20200403114520.php rename to src/Bundle/ChillJobBundle/src/migrations/old/Version20200403114520.php index a1a4e4f5e..ab80c48d7 100644 --- a/src/Bundle/ChillJobBundle/src/migrations/Version20200403114520.php +++ b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200403114520.php @@ -22,6 +22,7 @@ final class Version20200403114520 extends AbstractMigration { public function up(Schema $schema): void { + $this->skipIf(true, 'Skipping this old migration. Replaced by migration Version20240424095147'); $this->addSql('ALTER TABLE chill_csconnectes.projet_professionnel ADD domaineActiviteSouhait TEXT DEFAULT NULL;'); $this->addSql('ALTER TABLE chill_csconnectes.projet_professionnel ADD domaineActiviteValide TEXT DEFAULT NULL;'); } diff --git a/src/Bundle/ChillJobBundle/src/migrations/Version20200403123148.php b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200403123148.php similarity index 87% rename from src/Bundle/ChillJobBundle/src/migrations/Version20200403123148.php rename to src/Bundle/ChillJobBundle/src/migrations/old/Version20200403123148.php index c117ed34b..307cd14c7 100644 --- a/src/Bundle/ChillJobBundle/src/migrations/Version20200403123148.php +++ b/src/Bundle/ChillJobBundle/src/migrations/old/Version20200403123148.php @@ -21,6 +21,7 @@ final class Version20200403123148 extends AbstractMigration { public function up(Schema $schema): void { + $this->skipIf(true, 'Skipping this old migration. Replaced by migration Version20240424095147'); $this->addSql('ALTER TABLE chill_csconnectes.cs_person ADD dateavenantIEJ DATE DEFAULT NULL;'); }