<?php

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddBuildIdToSoloScoreTokens extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('solo_score_tokens', function (Blueprint $table) {
            $table->unsignedMediumInteger('build_id')->nullable()->after('ruleset_id');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('solo_score_tokens', function (Blueprint $table) {
            $table->dropColumn('build_id');
        });
    }
}

<?php

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddBuildIdToSoloScoreTokens extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('solo_score_tokens', function (Blueprint $table) {
            $table->unsignedMediumInteger('build_id')->null(true)->after('ruleset_id');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('solo_score_tokens', function (Blueprint $table) {
            $table->dropColumn('build_id');
        });
    }
}

--- 
+++ 
@@ -17,7 +17,7 @@
     public function up()
     {
         Schema::table('solo_score_tokens', function (Blueprint $table) {
-            $table->unsignedMediumInteger('build_id')->null(true)->after('ruleset_id');
+            $table->unsignedMediumInteger('build_id')->nullable()->after('ruleset_id');
         });
     }
 
Fix incorrect nullable specification in migration
