prevent empty migration warning (#2901)

This commit is contained in:
Kevin Papst
2021-11-03 15:48:42 +01:00
committed by GitHub
parent d4278996ae
commit 2bc76e7adc
8 changed files with 20 additions and 0 deletions

View File

@@ -30,5 +30,6 @@ final class Version20190219200020 extends AbstractMigration
public function down(Schema $schema): void
{
$this->preventEmptyMigrationWarning();
}
}

View File

@@ -49,5 +49,6 @@ final class Version20190706224211 extends AbstractMigration
{
// the columns above were created incorrect in migration Version20190617100845 for upgraded systems
// that's why there are no equivalent changes in down()
$this->preventEmptyMigrationWarning();
}
}

View File

@@ -40,5 +40,6 @@ final class Version20190729162655 extends AbstractMigration
public function down(Schema $schema): void
{
$this->preventEmptyMigrationWarning();
}
}

View File

@@ -39,9 +39,12 @@ final class Version20191113132640 extends AbstractMigration
$timesheetTags->removeForeignKey('FK_732EECA9BAD26311');
}
$timesheetTags->addForeignKeyConstraint('kimai2_tags', ['tag_id'], ['id'], ['onDelete' => 'CASCADE'], 'FK_732EECA9BAD26311');
$this->preventEmptyMigrationWarning();
}
public function down(Schema $schema): void
{
$this->preventEmptyMigrationWarning();
}
}

View File

@@ -31,5 +31,6 @@ final class Version20200323163039 extends AbstractMigration
public function down(Schema $schema): void
{
$this->preventEmptyMigrationWarning();
}
}

View File

@@ -43,11 +43,15 @@ final class Version20210802152814 extends AbstractMigration
}
$fetch->free();
$this->preventEmptyMigrationWarning();
}
public function down(Schema $schema): void
{
$timesheet = $schema->getTable('kimai2_timesheet');
$timesheet->changeColumn('date_tz', ['notnull' => false]);
$this->preventEmptyMigrationWarning();
}
}

View File

@@ -33,6 +33,8 @@ final class Version20210802174319 extends AbstractMigration
}
$fetch->free();
$this->preventEmptyMigrationWarning();
}
public function down(Schema $schema): void
@@ -48,5 +50,7 @@ final class Version20210802174319 extends AbstractMigration
$teams = $schema->getTable('kimai2_teams');
$teams->getColumn('teamlead_id')->setNotnull(true);
$teams->addForeignKeyConstraint('kimai2_users', ['teamlead_id'], ['id'], ['onDelete' => 'CASCADE'], 'FK_3BEDDC7F8F7DE5D7');
$this->preventEmptyMigrationWarning();
}
}