<?php

namespace KupShop\ElninoBundle\Resources\upgrade;

class AbraPaymentsUpgrade extends \UpgradeNew
{
    public function check_columnIdPayment()
    {
        return !$this->checkHasPrimaryKey('abra_payments');
    }

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