<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class AddSemesterToTps extends Migration
{
    public function up()
    {
        $this->forge->addColumn('learning_device_tps', [
            'semester' => [
                'type'       => 'TINYINT',
                'constraint' => 1,
                'default'    => 1,
                'null'       => false,
                'after'      => 'allocated_hours'
            ],
        ]);
    }

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