OK, I could get it solved with the help from this thread. Wondering how did I miss it before. Here is the trick for someone got the same issue.
Schema::table('users', function (Blueprint $table) {
$table->string('username')->nullable()->unique();
});
nullable() makes sure that the newly added column is filled with NULL for existing rows.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community