Add alter table statement to the conversion scripts changing HTMLMESSAGE datatype to LONGTEXT

Description

My third Liquibase MySQL run picked up an emailtemplateservice datatype mismatch.

2.7.2 auto-generated: HTMLMESSAGE = LONGTEXT (ets-0.4.6)
2.7.1 -> 2.7.2 convert: HTMLMESSAGE = TEXT (ets-0.4.4)

The mismatch issue involves the length attribute, first specified on 4 Nov 2010, r84317. The hibernate mapping specifies type text but with a length of 100,000,000 that's bigger than what the TEXT datatype can actually hold.

In MySQL the text datatype holds 65,535 characters while LONGTEXT can hold up to 4,294,967,295 or 4GB characters. This explains why the datatype is being set to LONGTEXT in the auto-generated email_template_item table. The 2.7.1>2.7.2 converted table HTMLMESSAGE datatype remains text.

Easy enough to fix: add an alter table statement to the conversion script changing HTMLMESSAGE to the datatype LONGTEXT. Not sure of its implications for the Oracle script.

Test no. 3

emailtemplateservice datatype mismatch detected

ets trunk, 0.4.x, 0.4.6 (sakai-2.7.2): EmailTemplate.hbm.xml

<!-- the email template message in html-->
<property name="htmlMessage" type="text">
<column name="HTMLMESSAGE" not-null="false" length="100000000"/>
</property>

ets 0.4.4 (sakai-2.7.1): EmailTemplate.hbm.xml

<!-- the email template message in html-->
<property name="htmlMessage" type="text">
<column name="HTMLMESSAGE" not-null="false" />
</property>

My comment with details:
https://jira.sakaiproject.org/browse/SAK-20932?focusedCommentId=136897&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-136897

is depended on by

Activity

Show:

Anthony Whyte September 10, 2011 at 12:16 PM

Statement was added.

Fixed

Details

Priority

Affects versions

Fix versions

Components

Assignee

Reporter

Created August 18, 2011 at 3:20 PM
Updated September 10, 2011 at 12:16 PM
Resolved September 10, 2011 at 12:16 PM