increasing the field size of products_models field in products table
I am using MySQL, and I'm having difficulty increasing the size of the products_model field in the products table. I need to increase it because the varchar max limit is only 255 (or 256, i forget), and that's not big enough for my needs. I need 510 atleast.
I have tried dropping the table then creating it again with the field as
> `products_model` text(510) default NULL,
and leaving in the original key setting line
> KEY `idx_products_model_zen` (`products_model`),
and i also tried as a blob type but i get this error for both
> BLOB/TEXT column 'products_model' used in key specification without a key length.
because the field is used as a key i suppose. It works ok as long as i don't set it as a key, but it's probably needed since it's been set up that way.
I know the field also exists in the table orders_products, though i don't know why as it would seem redundant to have it in both to me. Anyway, my plan was to change this field too once i had changed the one in the products table. In the meantime I don't see why this would be causing any referential integrity problems and so inhibit me changing the other table.
Does anyone know the syntax for setting the key with a length in the table creation SQL, as the error message implies? Or any other way i can achieve this?
My fingers are crossed as these forums have been seriously helpful on previous occasions.
All the best!
By binary in forum Setting Up Categories, Products, Attributes
Last Post: 19 Feb 2008, 04:37 AM
By christiansees in forum Managing Customers and Orders
Last Post: 20 Nov 2007, 05:04 PM
By davale in forum Templates, Stylesheets, Page Layout
Last Post: 19 Oct 2007, 06:19 AM
By JuxiZoza in forum Setting Up Categories, Products, Attributes
Last Post: 23 Mar 2006, 05:16 AM
Content and Graphics Copyright (c) 2003 - 2013 Zen Ventures, LLC - all rights reserved
Zen Cart® is a Registered Trademark of Zen Ventures, LLC