mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-14 23:22:52 +01:00
48 lines
963 B
PHP
48 lines
963 B
PHP
<?php
|
|
|
|
use App\Models\Design;
|
|
use App\Utils\Ninja;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
return new class extends Migration {
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
if (Ninja::isHosted()) {
|
|
$design = new Design();
|
|
|
|
$design->name = 'Calm';
|
|
$design->is_custom = false;
|
|
$design->design = '';
|
|
$design->is_active = true;
|
|
|
|
$design->save();
|
|
} elseif (Design::count() !== 0) {
|
|
$design = new Design();
|
|
|
|
$design->name = 'Calm';
|
|
$design->is_custom = false;
|
|
$design->design = '';
|
|
$design->is_active = true;
|
|
|
|
$design->save();
|
|
}
|
|
|
|
\Illuminate\Support\Facades\Artisan::call('ninja:design-update');
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
//
|
|
}
|
|
};
|