<?php

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

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

    public function down()
    {
        //
    }
}
