<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddProductIdToCourseTable extends Migration
{
    public function up()
    {
        Schema::table('courses', function (Blueprint $table) {
            if (!Schema::hasColumn("courses", 'product_id')) {
                $table->unsignedBigInteger('product_id')->nullable();
            }
        });
    }

    public function down()
    {
    }
}
