<?php

namespace Tenant\Database\Migrations;

use CodeIgniter\Database\Migration;

/**
 * A short blurb for a menu item or an event package — didn't exist as a
 * real field anywhere before the Phase 5 AI "Menu & Event Description
 * Writer" feature needed somewhere real to save a draft into. Purely
 * descriptive/staff-facing for now (this app has no public menu display
 * or public event-package page to show it on yet) — manager/F&B edits
 * and saves it manually; nothing auto-publishes it anywhere.
 */
class AddDescriptionToMenuItemsAndEvents extends Migration
{
    public function up()
    {
        $this->forge->addColumn('menu_items', [
            'description' => [
                'type'       => 'TEXT',
                'null'       => true,
                'after'      => 'category',
            ],
        ]);

        $this->forge->addColumn('events', [
            'description' => [
                'type'       => 'TEXT',
                'null'       => true,
                'after'      => 'venue_space',
            ],
        ]);
    }

    public function down()
    {
        $this->forge->dropColumn('menu_items', 'description');
        $this->forge->dropColumn('events', 'description');
    }
}
