Wedge
Public area => Plugins => The Pub => Plugin Support => Topic started by: CerealGuy on June 22nd, 2014, 10:29 PM
-
I'm trying to create a collumn with mediumtext as type via plugin-info.xml.
First the plugin-info.xml:
<database>
<tables>
<table if-exists="update" name="{db_prefix}text">
<columns>
<column name="id" autoincrement="yes" type="mediumint" unsigned="yes" />
<column name="test" type="mediumtext" size="255" />
</columns>
<index type="primary">
<field>id</field>
<field>test</field>
</index>
</table>
</tables>
</database>
Error
BLOB/TEXT column 'test' used in key specification without a key length
Datei: /home/oqcchckd/public_html/wedge/core/app/Class-DBHelper.php
Zeile: 339
CREATE TABLE wedge_text
(
`id` mediumint(8) unsigned NOT NULL auto_increment,
`test` mediumtext NOT NULL,
PRIMARY KEY (id,test)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
First thought its a problem with the mysql server but tried it on a different host, same error. How do i define the key length and shouldn't be there default values and/or the size parameter used?
Thanks in advance
EDIT: Problem found :D For some reasons its not good to make it primary, related to mysql ^^ Perhaps it helps people with the same problem :D
-
Does your text field need to be indexed?
Problem comes from index not specifying a size for the test field... And it can't index the entirety of the field. ;)
-
Does your text field need to be indexed?
Problem comes from index not specifying a size for the test field... And it can't index the entirety of the field. ;)
No... not really :D That was the problem :lol:
Thanks :)