mirror of https://github.com/pixelfed/pixelfed
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.1 KiB
PHP
56 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use Illuminate\Console\Command;
|
|
|
|
class UpdateCommand extends Command
|
|
{
|
|
/**
|
|
* The name and signature of the console command.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $signature = 'update';
|
|
|
|
/**
|
|
* The console command description.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $description = 'Run pixelfed schema updates between versions.';
|
|
|
|
/**
|
|
* Create a new command instance.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
|
|
/**
|
|
* Execute the console command.
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function handle()
|
|
{
|
|
$this->update();
|
|
}
|
|
|
|
public function update()
|
|
{
|
|
$this->info('Starting update...');
|
|
$this->line(' ');
|
|
$this->callSilent('config:cache');
|
|
$this->callSilent('route:cache');
|
|
$this->callSilent('migrate', [
|
|
'--force' => true,
|
|
]);
|
|
$this->callSilent('horizon:terminate');
|
|
$this->info('Completed update!');
|
|
}
|
|
}
|