<?php

if (!defined('_PS_VERSION_')) {
    exit;
}

function upgrade_module_1_5_2($module)
{
    $columnExists = Db::getInstance()->executeS(
        'SHOW COLUMNS FROM `' . _DB_PREFIX_ . 'paxy_order_point` LIKE "pickup_point_details"'
    );

    if (empty($columnExists)) {
        $sql = 'ALTER TABLE `' . _DB_PREFIX_ . 'paxy_order_point` 
                ADD `pickup_point_details` VARCHAR(1024) NULL DEFAULT NULL';
        return Db::getInstance()->execute($sql);
    }

    return true;
}
