mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 05:32:39 +01:00
Merge pull request #5903 from beganovich/v5-0206-tech-migration
(v5) Fixes for Tech design migration
This commit is contained in:
commit
19919d224d
@ -14,12 +14,27 @@ class AddTechDesign extends Migration
|
|||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
if (Ninja::isHosted()) {
|
if (Ninja::isHosted()) {
|
||||||
return Design::create(['id' => 10, 'name' => 'Tech', 'user_id' => null, 'company_id' => null, 'is_custom' => false, 'design' => '', 'is_active' => true]);
|
$design = new Design();
|
||||||
|
|
||||||
|
$design->id = 10;
|
||||||
|
$design->name = 'Tech';
|
||||||
|
$design->is_custom = false;
|
||||||
|
$design->design = '';
|
||||||
|
$design->is_active = true;
|
||||||
|
|
||||||
|
$design->save();
|
||||||
|
} elseif (Design::count() !== 0) {
|
||||||
|
$design = new Design();
|
||||||
|
|
||||||
|
$design->name = 'Tech';
|
||||||
|
$design->is_custom = false;
|
||||||
|
$design->design = '';
|
||||||
|
$design->is_active = true;
|
||||||
|
|
||||||
|
$design->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Design::count() !== 0) {
|
\Illuminate\Support\Facades\Artisan::call('ninja:design-update');
|
||||||
return Design::create(['name' => 'Tech', 'user_id' => null, 'company_id' => null, 'is_custom' => false, 'design' => '', 'is_active' => true]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user