Lanzar el comando:
php artisan make:migration add_columnA_to_tableX
Esto creará la migración add_columnA_to_tableX:
class AddcolumnAToTableX extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('tableX', function (Blueprint $table) {
$table->string('nuevaColumna')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('tableX', function (Blueprint $table) {
$table->dropColumn(['nuevaColumna']);
});
}
}
Por último, ejecutar la migración:
php artisan migrate