<?php

namespace App\Database\Migrations;

use CodeIgniter\Database\Migration;

class AddProfilePhotoToUsers extends Migration
{
    public function up(): void
    {
        // Lives on `users` (not candidate_profiles) since it's a personal
        // photo tied to the individual account — covers candidates AND
        // agency owners/recruiters (a personal headshot, distinct from
        // agencies.logo_path which is the company logo).
        $this->forge->addColumn('users', [
            'profile_photo_path' => ['type' => 'VARCHAR', 'constraint' => 255, 'null' => true, 'after' => 'username'],
        ]);
    }

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