<?php
/**
* 2022 Anvanto
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
*
*  @author    Anvanto <anvantoco@gmail.com>
*  @copyright 2022 Anvanto
*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*/

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

function upgrade_module_1_0_5($object)
{
    $sql = [];

    $sql[] = 'ALTER TABLE `' . _DB_PREFIX_ . 'an_homeslider_sliders`
            ADD `preloader_mobile_height_580` int(10) unsigned NOT NULL AFTER `preloader_height_767` ';

    $sql[] = 'ALTER TABLE `' . _DB_PREFIX_ . 'an_homeslider_sliders`
            ADD `preloader_mobile_height_440` int(10) unsigned NOT NULL AFTER `preloader_height_767` ';

    $sql[] = 'ALTER TABLE `' . _DB_PREFIX_ . 'an_homeslider_sliders`
            ADD `preloader_mobile_height_320` int(10) unsigned NOT NULL AFTER `preloader_height_767` ';

    $return = true;
    foreach ($sql as $_sql) {
        $return = Db::getInstance()->Execute($_sql);
      if (!$return){
        return false;
      }
    }

    return true;
}
