Hi there to all,
Greetings from a noob!

I m trying to create a db table that involves the 'table' field which is also being used in a unique constraint.
This is the table:

DROP TABLE IF EXISTS `wrd_component`;
CREATE TABLE `wrd_component` (
`tid` int( unsigned NOT NULL default '0',
`gid` bigint( unsigned NOT NULL default '0',
`submit_loc` int(11) NOT NULL default '0',
`to_location` int(11) default NULL,
`priority` int(11) default NULL,
`frame` int( default '1',
`status` int(11) default NULL,
`file_name` TEXT,

`remote_name` TEXT,

`permission` varchar(10) default NULL,
`use_tar` tinyint(1) default '0',
`use_rsync` tinyint(1) default '0',
`use_rsync_delete` tinyint(1) default '0',
`includes` text,
`excludes` text,
`follow_symlink` tinyint(1) default '0',
`type` int(11) default NULL,

CONSTRAINT uniq UNIQUE KEY(remote_name, to_location),

PRIMARY KEY (`tid`,`gid`,`submit_loc`),
KEY `submit_loc` (`submit_loc`),
KEY `gid` (`gid`),
KEY `wrd_com_4` (`gid`,`submit_loc`,`frame`),
KEY `wrd_com_5` (`gid`,`submit_loc`,`tid`),
KEY `wrd_com_6` (`frame`),
KEY `wrd_com_7` (`status`),
KEY `wrd_com_8` (`gid`,`submit_loc`,`status`),
KEY `wrd_com_9` (`gid`,`submit_loc`,`status`,`frame`)

And here is the error:
ERROR 1170 (42000) at line 2: BLOB/TEXT column 'remote_name' used in key specification without a key length

I have to use 'table' as storage as the file name can be extremely long and hence varchar wont work.

But as you can all see it doesn't work with unique constraints however if I remove the unique constraint then there is no problem and everything works fine.

So my question is:
Can I use text as a field and still retain the unique constraint?

Please help as I am a relative noob as far as MySQL is concerned.And this thing is bugging my work for long.

Thanks in advance!