<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class AddMajorToClassesTable extends Migration
{
    public function up()
    {
        $this->forge->addColumn('classes', [
            'major' => [
                'type'       => 'VARCHAR',
                'constraint' => 50,
                'null'       => false,
                'default'    => 'IPA',
                'after'      => 'grade',
            ],
        ]);
    }

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