<?php
declare(strict_types=1);
// ==================================================
// Nuclear Fancy Pants Edition™ — NUCLEAR+++
// File: /migrations/012_business_profile_facebook_bio.php
// Description: Add facebook_bio column to amai_business_profile - NUCLEAR+++
// Last Edited: 2026-04-11
// ==================================================
namespace AutoMarketerAI\Migrations;
defined('ABSPATH') || exit;
final class Migration_012_BusinessProfileFacebookBio
{
    public const VERSION     = '012';
    public const DESCRIPTION = 'Add facebook_bio column to amai_business_profile';
    public function up(): void
    {
        global $wpdb;
        $table  = $wpdb->prefix . 'amai_business_profile';
        $exists = $wpdb->get_results(
            "SHOW COLUMNS FROM `{$table}` LIKE 'facebook_bio'"
        );
        if (empty($exists)) {
            $wpdb->query(
                "ALTER TABLE `{$table}`
                 ADD COLUMN `facebook_bio` TEXT NULL DEFAULT NULL"
            );
        }
    }
}