Move old migrations to directory 'old' just in case

This commit is contained in:
Julie Lenaerts 2024-04-24 12:27:23 +02:00
parent 650e85c481
commit 0b5be0419b
14 changed files with 26 additions and 3 deletions

View File

@ -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');

View File

@ -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');

View File

@ -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');
}
}

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -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))');

View File

@ -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)');

View File

@ -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 ');

View File

@ -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');

View File

@ -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;');
}

View File

@ -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;');
}