<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class AddPegIdToTeachers extends Migration
{
    public function up()
    {
        $this->forge->addColumn('teachers', [
            'peg_id' => [
                'type'       => 'VARCHAR',
                'constraint' => 30,
                'null'       => true,
                'after'      => 'nip',
                'comment'    => 'Peg ID / NUPTK untuk guru non-PNS/PPPK',
            ],
        ]);
    }

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