2014-05-14 23:24:20 +10:00
|
|
|
<?php namespace System\Console;
|
|
|
|
|
|
|
|
use Illuminate\Console\Command;
|
|
|
|
use System\Classes\UpdateManager;
|
|
|
|
|
2017-03-16 17:08:20 +11:00
|
|
|
/**
|
|
|
|
* Console command to migrate the database.
|
|
|
|
*
|
|
|
|
* This builds up all database tables that are registered for October and all plugins.
|
|
|
|
*
|
|
|
|
* @package october\system
|
|
|
|
* @author Alexey Bobkov, Samuel Georges
|
|
|
|
*/
|
2014-05-14 23:24:20 +10:00
|
|
|
class OctoberUp extends Command
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The console command name.
|
|
|
|
*/
|
|
|
|
protected $name = 'october:up';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The console command description.
|
|
|
|
*/
|
|
|
|
protected $description = 'Builds database tables for October and all plugins.';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Execute the console command.
|
|
|
|
*/
|
2017-07-14 16:28:47 +10:00
|
|
|
public function handle()
|
2014-05-14 23:24:20 +10:00
|
|
|
{
|
|
|
|
$this->output->writeln('<info>Migrating application and plugins...</info>');
|
|
|
|
|
2017-05-20 09:03:58 +10:00
|
|
|
UpdateManager::instance()
|
|
|
|
->setNotesOutput($this->output)
|
|
|
|
->update()
|
|
|
|
;
|
2014-05-14 23:24:20 +10:00
|
|
|
}
|
2014-10-18 11:58:50 +02:00
|
|
|
}
|