Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,20 @@

'migrations' => 'migrations',

/*
|--------------------------------------------------------------------------
| Console Configuration Table
|--------------------------------------------------------------------------
|
| This table controls the configurable behavior of the console as
| as it relates to the database and migrations.
|
*/

'console' => [
'confirm_in_prod' => env('MIGRATION_CONFIRM_IN_PROD', false),
],

/*
|--------------------------------------------------------------------------
| Redis Databases
Expand Down
15 changes: 13 additions & 2 deletions modules/system/console/WinterUp.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?php namespace System\Console;
<?php

namespace System\Console;

use Illuminate\Console\Command;
use Illuminate\Console\ConfirmableTrait;
use Illuminate\Contracts\Console\Isolatable;
use System\Classes\UpdateManager;

Expand All @@ -14,13 +17,17 @@
*/
class WinterUp extends Command implements Isolatable
{
use ConfirmableTrait;

/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'winter:up
{--seed : Included for compatibility with Laravel default signature, no effect at this time}';
{--seed : Included for compatibility with Laravel default signature, no effect at this time}
{--force : Force the operation to run when in production}
';

/**
* The console command description.
Expand All @@ -43,6 +50,10 @@ public function __construct()
*/
public function handle()
{
if (config('database.console.confirm_in_prod', false) && !$this->confirmToProceed()) {
return 1;
}

$this->output->writeln('<info>Migrating application and plugins...</info>');

UpdateManager::instance()
Expand Down
Loading