<?php

namespace KupShop\ElninoBundle\Resources\upgrade;

class AbraDeliveriesUpgrade extends \UpgradeNew
{
    public function check_columnIdDelivery()
    {
        return !$this->checkHasPrimaryKey('abra_deliveries');
    }

    /** 'abra_deliveries' creates PRIMARY key for column id_delivery */
    public function upgrade_columnIdDelivery()
    {
        sqlQuery('ALTER IGNORE TABLE abra_deliveries ADD PRIMARY KEY (id_delivery);');
        $this->upgradeOK();
    }
}
