1
0
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:
Benjamin Beganović 2021-06-02 18:09:25 +02:00 committed by GitHub
commit 19919d224d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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]);
}
} }
/** /**