Skip to content
Open
Changes from 5 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
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;

/**
Comment thread
LukeTowers marked this conversation as resolved.
* 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 (!$this->confirmToProceed()) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!$this->confirmToProceed()) {
if (config('database.migrations.confirm_in_prod', false) && !$this->confirmToProceed()) {

Copy link
Copy Markdown
Contributor Author

@IsaiahPaget IsaiahPaget Jun 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LukeTowers Sorry I had a dyslexic moment reading your comment, I read 'comment' as 'commit' and I have never seen this 'suggested diff' feature so I am just now realizing this is just a suggestion, not actually added to the branch.

But now I am following lol. In the database.php did you have something like this in-mind:

    /*
    |--------------------------------------------------------------------------
    | Migration Repository Table
    |--------------------------------------------------------------------------
    |
    | This table keeps track of all the migrations that have already run for
    | your application. Using this information, we can determine which of
    | the migrations on disk haven't actually been run in the database.
    |
    */

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty much exactly that @IsaiahPaget

return 1;
}

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

UpdateManager::instance()
Expand Down
Loading