<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class AddFaceHashToStudentsTable extends Migration
{
    public function up()
    {
        $this->forge->addColumn('students', [
            'face_hash' => [
                'type'       => 'VARCHAR',
                'constraint' => 32,
                'null'       => true,
                'after'      => 'face_external_id',
                'comment'    => 'MD5 hash dari file foto wajah referensi',
            ],
        ]);
    }

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

