Got a question? We have the Answer. Anything you need to know about couponPHP

How to lift up text fields limits in 2.1 version?

On the 02 September 2016

By default 2.1 version of the CouponPHP script has some too small limits to some text fields like for example Store description field preventing you from saving large text there.
Here we share a part of 2.2 version that lifts up limits of almost all the text fields in the script to 65,535 characters.
Just execute this SQL code in your PhpMyAdmin

alter table categories drop index perma;
alter table categories modify perma text;
create index perma on categories(perma(200));
alter table categories modify title text;
alter table categories modify thumbnail text;
alter table categories modify icon text;
alter table category_keywords modify keyword text;
alter table clicks modify user_ip text;
alter table clicks modify user_agent text;
alter table clicks modify url text;
alter table clicks modify referrer text;
alter table collections modify title text;
alter table collections modify icon text;
alter table collections drop index perma;
alter table collections modify perma text;
create index perma on collections(perma(200));
alter table collections modify thumbnail text;
alter table coupons modify thumbnail text;
alter table coupons drop index coupon_code;
alter table coupons modify code text;
create index coupon_code on coupons(code(200));
alter table coupons modify title text;
alter table coupons modify description text;
alter table coupons modify url text;
alter table email_queue modify email text;
alter table email_queue modify subject text;
alter table pages drop index permalink;
alter table pages modify permalink text;
create index permalink on pages(permalink(200));
alter table pending_coupons modify thumbnail text;
alter table pending_coupons drop index coupon_code;
alter table pending_coupons modify code text;
create index coupon_code on pending_coupons(code(200));
alter table pending_coupons modify url text;
alter table pending_coupons modify title text;
alter table pending_coupons modify description text;
alter table settings drop index title;
alter table settings modify title text;
create index title on settings(title(200));
alter table stores modify title text;
alter table stores drop index perma;
alter table stores modify perma text;
create index perma on stores(perma(200));
alter table stores drop index domain;
alter table stores modify domain text;
create index domain on stores(domain(200));
alter table stores modify affiliate_url text;
alter table subscriptions modify email text;
alter table users drop index username;
alter table users modify username text;
create index username on users(username(200));
alter table users modify password text;
alter table users drop index email;
alter table users modify email text;
create index email on users(email(200));
alter table users modify about_me text;
alter table users modify website text;
alter table users modify avatar text;
alter table users drop index fb_id;
alter table users modify facebook_id text;
create index fb_id on users(facebook_id(200));
alter table users modify facebook_session text;
alter table users modify twitter_id text;
alter table users modify twitter_token text;
alter table users modify twitter_secret text;
alter table admin drop index username;
alter table admin modify username text;
create index username on admin(username(200));
alter table admin drop index password;
alter table admin modify password text;
create index password on admin(password(200));

In case you have the Blog Plugin installed execute also this code:
alter table blog_categories modify title text;
alter table blog_categories modify perma text;
alter table blog_posts modify title text;
alter table blog_posts modify excerpt text;
alter table blog_posts modify perma text;
alter table blog_posts modify featured_image text;
alter table blog_tags modify tag text;
alter table blog_tags modify perma text;