<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class AddImageUrlToInventory extends Migration
{
    public function up(): void
    {
        $this->forge->addColumn('inventory', [
            'image_url' => [
                'type'       => 'VARCHAR',
                'constraint' => 512,
                'null'       => true,
                'after'      => 'stock_count',
            ],
        ]);
    }

    public function down(): void
    {
        $this->forge->dropColumn('inventory', 'image_url');
    }
}
