mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-26 11:48:49 +02:00
Really skip migrations that are not needed.
This commit is contained in:
parent
bc885decf5
commit
7c16ee299b
2 changed files with 6 additions and 2 deletions
|
@ -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\'.');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue