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
PHTML
56 lines
1.1 KiB
PHTML
|
8 years ago
|
<?php
|
||
|
|
|
||
|
4 weeks ago
|
namespace App\Console\Commands\Install;
|
||
|
8 years ago
|
|
||
|
|
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()
|
||
|
|
{
|
||
|
8 years ago
|
$this->update();
|
||
|
8 years ago
|
}
|
||
|
|
|
||
|
8 years ago
|
public function update()
|
||
|
8 years ago
|
{
|
||
|
9 months ago
|
$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!');
|
||
|
8 years ago
|
}
|
||
|
|
}
|