<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class AddCategoryToMenuPackagesTable extends Migration
{
    public function up()
    {
        $fields = [
            'category' => [
                'type'       => 'VARCHAR',
                'constraint' => '50',
                'default'    => 'Lunch',
                'after'      => 'name',
            ],
        ];
        $this->forge->addColumn('menu_packages', $fields);
    }

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