<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class ExtendAgencyProfileFields extends Migration
{
    public function up(): void
    {
        $this->forge->addColumn('agencies', [
            'cover_image_path' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true, 'after' => 'logo_path'],
            'services'         => ['type' => 'TEXT', 'null' => true, 'after' => 'description'],
            'social_links'     => ['type' => 'JSON', 'null' => true], // {"linkedin":"...","facebook":"...","twitter":"..."}
        ]);
    }

    public function down(): void
    {
        $this->forge->dropColumn('agencies', ['cover_image_path', 'services', 'social_links']);
    }
}
