1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Fix for migration

This commit is contained in:
David Bomba 2020-11-01 20:41:49 +11:00
parent e3696a49ab
commit f911d17a6b
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",