<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class AddIsLegacyToExamDrafts extends Migration
{
    public function up()
    {
        $this->forge->addColumn('exam_drafts', [
            'is_legacy' => [
                'type'       => 'TINYINT',
                'constraint' => 1,
                'default'    => 0,
                'after'      => 'admin_id',
            ],
        ]);
    }

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

