<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class AddLevelToSubjectsTable extends Migration
{
    public function up()
    {
        $this->forge->addColumn('subjects', [
            'level' => [
                'type'       => 'ENUM',
                'constraint' => ['MI', 'MTs', 'MA', 'ALL'],
                'default'    => 'ALL',
                'after'      => 'name',
            ],
        ]);
    }

    public function down()
    {
        $this->forge->dropColumn('subjects', 'level');
    }
}