database/migrations/2021_06_25_093949_add_finished_to_course_user_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddFinishedToCourseUserTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('course_user', function (Blueprint $table) {
$table->boolean('finished')->default(false);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('course_user', function (Blueprint $table) {
$table->dropColumn('finished');
});
}
}