<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('course_subscriptions', function (Blueprint $table) {
            $table->integer('month_day')->default(1);
            $table->enum('when_start', ['COURSE', 'MEMBER', 'CUSTOM']);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('course_subscriptions', function (Blueprint $table) {
            $table->dropColumn('month_day');
            $table->dropColumn('when_start');
        });
    }
};
