<?php

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

class AddCategoryColumnInCourseSubscription extends Migration
{
    public function up()
    {
        Schema::table('course_subscriptions', function ($table) {
            if (!Schema::hasColumn('course_subscriptions', 'category_id')) {
                $table->integer('category_id')->nullable()->default(0);
            }
        });
    }

    public function down()
    {

    }
}
