I have this simple code which when I run - it does not do anything at all. When I migrate, the migration runs - I have feedback from console: Migrated.....
But the database stays the same. In migrations table I see my migration, also with a correct batch.
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddDateToProgram extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('schedules', function(Blueprint $table) {
$table->string('day')->default('2018-05-24')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('schedules', function(Blueprint $table) {
$table->dropIfExists('day');
});
}
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire