1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Merge pull request #4242 from turbo124/v5-develop

Fix for migration
This commit is contained in:
David Bomba 2020-11-01 20:42:14 +11:00 committed by GitHub
commit e5935c492e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 5 deletions

View File

@ -99,8 +99,6 @@ class StartMigration implements ShouldQueue
return true;
}
$this->company->setMigration(true);
$file = storage_path("migrations/$filename/migration.json");
if (! file_exists($file)) {
@ -111,9 +109,7 @@ class StartMigration implements ShouldQueue
Import::dispatchNow($data, $this->company, $this->user);
$this->company->setMigration(false);
} catch (NonExistingMigrationFile | ProcessingMigrationArchiveFailed | ResourceNotAvailableForMigration | MigrationValidatorFailed | ResourceDependencyMissing $e) {
$this->company->setMigration(false);
Mail::to($this->user)->send(new MigrationFailed($e, $e->getMessage()));

View File

@ -320,6 +320,7 @@ class BaseRepository
$model->design_id = $this->decodePrimaryKey($client->getSetting('invoice_design_id'));
}
//links tasks and expenses back to the invoice.
$model->service()->linkEntities()->save();
}

View File

@ -23,7 +23,7 @@
"invoice2": "surcharge2"
},
"created_at": "2020-06-30",
"updated_at": "2020-10-30",
"updated_at": "2020-11-01",
"settings": {
"timezone_id": "15",
"date_format_id": "1",