Improve logic for logging into the websocket of the target node

This commit is contained in:
Matthew Penner 2020-12-16 18:54:01 -07:00
parent 5c5e2e24f1
commit 01926e2896
6 changed files with 63 additions and 31 deletions

View file

@ -0,0 +1,38 @@
<?php
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddArchivedFieldToServerTransfersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('server_transfers', function (Blueprint $table) {
$table->boolean('archived')->default(0)->after('new_additional_allocations');
});
// Update archived to all be true on existing transfers.
Schema::table('server_transfers', function (Blueprint $table) {
DB::statement('UPDATE `server_transfers` SET `archived` = 1 WHERE `successful` = 1');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('server_transfers', function (Blueprint $table) {
$table->dropColumn('archived');
});
}
}