<?php

namespace KupShop\AdminBundle\Resources\upgrade;

class SharedDeliveryZasilkovnaUpgrade extends \UpgradeNew
{
    protected $priority = 100;

    public function check_zipZasilkovnaIsZerofill()
    {
        return !$this->checkColumnType('delivery_zasilkovna', 'zip', 'int(5) unsigned zerofill', 'kupshop_shared');
    }

    /** Remove zerofill type on delivery_zasilkovna.zip */
    public function upgrade_zipZasilkovnaIsZerofill()
    {
        sqlQuery('ALTER TABLE kupshop_shared.delivery_zasilkovna MODIFY zip INT(5) UNSIGNED NULL;');

        $this->upgradeOK();
    }
}
