mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 22:14:36 -04:00
Fix for migration
This commit is contained in:
parent
e3696a49ab
commit
f911d17a6b
@ -99,8 +99,6 @@ class StartMigration implements ShouldQueue
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->company->setMigration(true);
|
|
||||||
|
|
||||||
$file = storage_path("migrations/$filename/migration.json");
|
$file = storage_path("migrations/$filename/migration.json");
|
||||||
|
|
||||||
if (! file_exists($file)) {
|
if (! file_exists($file)) {
|
||||||
@ -111,9 +109,7 @@ class StartMigration implements ShouldQueue
|
|||||||
|
|
||||||
Import::dispatchNow($data, $this->company, $this->user);
|
Import::dispatchNow($data, $this->company, $this->user);
|
||||||
|
|
||||||
$this->company->setMigration(false);
|
|
||||||
} catch (NonExistingMigrationFile | ProcessingMigrationArchiveFailed | ResourceNotAvailableForMigration | MigrationValidatorFailed | ResourceDependencyMissing $e) {
|
} catch (NonExistingMigrationFile | ProcessingMigrationArchiveFailed | ResourceNotAvailableForMigration | MigrationValidatorFailed | ResourceDependencyMissing $e) {
|
||||||
$this->company->setMigration(false);
|
|
||||||
|
|
||||||
Mail::to($this->user)->send(new MigrationFailed($e, $e->getMessage()));
|
Mail::to($this->user)->send(new MigrationFailed($e, $e->getMessage()));
|
||||||
|
|
||||||
|
@ -320,6 +320,7 @@ class BaseRepository
|
|||||||
$model->design_id = $this->decodePrimaryKey($client->getSetting('invoice_design_id'));
|
$model->design_id = $this->decodePrimaryKey($client->getSetting('invoice_design_id'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//links tasks and expenses back to the invoice.
|
||||||
$model->service()->linkEntities()->save();
|
$model->service()->linkEntities()->save();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
"invoice2": "surcharge2"
|
"invoice2": "surcharge2"
|
||||||
},
|
},
|
||||||
"created_at": "2020-06-30",
|
"created_at": "2020-06-30",
|
||||||
"updated_at": "2020-10-30",
|
"updated_at": "2020-11-01",
|
||||||
"settings": {
|
"settings": {
|
||||||
"timezone_id": "15",
|
"timezone_id": "15",
|
||||||
"date_format_id": "1",
|
"date_format_id": "1",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user