string("openid",50)->nullable()->change(); }); Schema::table('main_coaches', function (Blueprint $table) { $table->string("openid",50)->nullable()->change(); }); Schema::table('customer_service_users', function (Blueprint $table) { $table->string("openid",50)->nullable()->change(); }); Schema::table('coaches', function (Blueprint $table) { $table->string("openid",50)->nullable()->change(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('chef_user', function (Blueprint $table) { $table->string('openid',50)->nullable(false)->change(); // 这里需要确保没有null值在该列中 }); Schema::table('main_coaches', function (Blueprint $table) { $table->string('openid',50)->nullable(false)->change(); // 这里需要确保没有null值在该列中 }); Schema::table('customer_service_users', function (Blueprint $table) { $table->string('openid',50)->nullable(false)->change(); // 这里需要确保没有null值在该列中 }); Schema::table('coaches', function (Blueprint $table) { $table->string('openid',50)->nullable(false)->change(); // 这里需要确保没有null值在该列中 }); } };