You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by Serge Huber <se...@jahia.com> on 2004/03/25 16:38:57 UTC
cornerstonedemo-schema.xml problem with VARCHAR
Hi,
It seems that there is a problem with the TEST_USER and TEST_GROUP tables
from the cornerstonedemo-schema.xml file when using MySQL. The schema
contains :
<table name="TEST_USER">
<column name="ID" primaryKey="true" required="true" type="INTEGER"/>
<column name="LOGIN_NAME" type="VARCHAR"/>
<column name="FIRST_NAME" type="VARCHAR"/>
<column name="LAST_NAME" type="VARCHAR"/>
</table>
<table name="TEST_GROUP">
<column name="ID" primaryKey="true" required="true" type="INTEGER"/>
<column name="NAME" type="VARCHAR"/>
</table>
There is no size attribute on the VARCHAR types, and MySQL requires this to
be set, as the VARCHAR type is limited to 255 under MySQL 4 (MySQL 5
automatically handles this case but it's still in Alpha). Anyway I think it
is reasonable to limit the size of these fields as they should not need to
be unlimited.
A suggestion would be therefore :
<table name="TEST_USER">
<column name="ID" primaryKey="true" required="true" type="INTEGER"/>
<column name="LOGIN_NAME" size="30" type="VARCHAR"/>
<column name="FIRST_NAME" size="50" type="VARCHAR"/>
<column name="LAST_NAME" size="50" type="VARCHAR"/>
</table>
<table name="TEST_GROUP">
<column name="ID" primaryKey="true" required="true" type="INTEGER"/>
<column name="NAME" size="30" type="VARCHAR"/>
</table>
Note that the sizes here we set arbitrarely, without looking at the code,
so there might be some assumptions that are missing. Anyway, hope this
helps...
Regards,
Serge Huber.
- -- --- -----=[ serge.huber at jahia dot com ]=---- --- -- -
Jahia : A collaborative source CMS and Portal Server
www.jahia.org Community and product web site
www.jahia.com Commercial services company
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org