diff --git a/migrations/Version1.php b/migrations/Version1.php index c4d7abde..ccbe4479 100644 --- a/migrations/Version1.php +++ b/migrations/Version1.php @@ -37,8 +37,11 @@ final class Version1 extends AbstractMultiPlatformMigration public function mySQLUp(Schema $schema): void { - - $this->warnIf($this->getOldDBVersion() > 0, 'Old Part-DB Database detected! Continue with upgrade...'); + //Skip if old DB is detected + if ($this->getOldDBVersion() > 0) { + $this->warnIf(true, 'Old Part-DB Database detected! Continue with upgrade...'); + return; + } // this up() migration is auto-generated, please modify it to your needs $this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.'); diff --git a/migrations/Version20190902140506.php b/migrations/Version20190902140506.php index 31798f06..329c1fcf 100644 --- a/migrations/Version20190902140506.php +++ b/migrations/Version20190902140506.php @@ -48,6 +48,7 @@ final class Version20190902140506 extends AbstractMultiPlatformMigration } catch (DBALException $dBALException) { //when the table was not found, then you can not use this migration $this->warnIf(true, 'Empty database detected. Skip migration.'); + return; } //Deactive SQL Modes (especially NO_ZERO_DATE, which prevents updating)