<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class AddKondisiToBuku extends Migration
{
    public function up()
    {
        $this->forge->addColumn('buku', [
            'kondisi' => [
                'type'       => 'VARCHAR',
                'constraint' => 50,
                'null'       => true,
                'default'    => 'Baik',
                'after'      => 'total_harga',
            ],
        ]);
    }

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