<?php

namespace KupShop\CatalogBundle\Resources\upgrade;

class AttachmentsTitleUpgrade extends \UpgradeNew
{
    public function check_titleCharLimit()
    {
        return $this->checkColumnType('attachments', 'title', 'VARCHAR(255)');
    }

    /** Increase title char limit from 50 to 255 in 'attachments' table */
    public function upgrade_titleCharLimit()
    {
        sqlQuery("ALTER TABLE attachments MODIFY title VARCHAR(255) DEFAULT '' NOT NULL ");
        $this->upgradeOK();
    }
}
