<?php
declare(strict_types=1);
// ==================================================
// Nuclear Fancy Pants Edition™ — NUCLEAR+++
// File: /includes/migrations/029_abandoned_carts_phone.php
// Description: Add phone column to wp_amai_abandoned_carts for SMS nudge support - NUCLEAR+++
// Last Edited: 2026-05-09
// ==================================================

namespace AutoMarketerAI\Migrations;

defined('ABSPATH') || exit;

final class Migration_029_AbandonedCartsPhone
{
    public function up(): void
    {
        global $wpdb;
        $table = $wpdb->prefix . 'amai_abandoned_carts';

        $wpdb->query(
            "ALTER TABLE `{$table}` ADD COLUMN IF NOT EXISTS `phone` VARCHAR(20) NOT NULL DEFAULT '' AFTER `email`"
        );
    }
}