Changeset 1407
- Timestamp:
- Jan 18, 2011, 1:43:11 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/DatabaseUpgrade.groovy
r1406 r1407 29 29 30 30 // execute per-change check and upgrade code 31 changeStudyDescription(sql, db) // r1245 / r124632 changeStudyDescriptionToText(sql, db) // r132733 changeTemplateTextFieldSignatures(sql, db) 31 changeStudyDescription(sql, db) // r1245 / r1246 32 changeStudyDescriptionToText(sql, db) // r1327 33 changeTemplateTextFieldSignatures(sql, db) // prevent Grails issue, see http://jira.codehaus.org/browse/GRAILS-6754 34 34 } 35 35 … … 107 107 /** 108 108 * it appears that some TEXT template fields are not of type 'text' 109 * which results in the '255' character issue 109 * due to an issue in how Grails' GORM works with domain inheritance 110 * (see http://jira.codehaus.org/browse/GRAILS-6754) 110 111 * @param sql 111 112 * @param db … … 119 120 try { 120 121 // change the datatype of text fields to text 121 sql.execute( "ALTER TABLE ${row.tablename.toString()} ALTER COLUMN template_text_fields_elt TYPE text")122 sql.execute( "ALTER TABLE ${row.tablename.toString()} ALTER COLUMN template_text_fields_string TYPE text")122 sql.execute(sprintf("ALTER TABLE %s ALTER COLUMN template_text_fields_elt TYPE text", row.tablename)) 123 sql.execute(sprintf("ALTER TABLE %s ALTER COLUMN template_text_fields_string TYPE text", row.tablename)) 123 124 124 125 } catch (Exception e) {
Note: See TracChangeset
for help on using the changeset viewer.