Changeset 1406


Ignore:
Timestamp:
Jan 18, 2011, 1:12:24 PM (12 years ago)
Author:
work@…
Message:
  • test fix for database upgrade script
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/conf/DatabaseUpgrade.groovy

    r1405 r1406  
    3737         * execute database change r1245 / r1246 if required
    3838         * @param sql
     39         * @param db
    3940         */
    4041        public static void changeStudyDescription(sql, db) {
     
    8384         * execute database change r1327 if required
    8485         * @param sql
     86         * @param db
    8587         */
    8688        public static void changeStudyDescriptionToText(sql, db) {
     
    103105        }
    104106
     107        /**
     108         * it appears that some TEXT template fields are not of type 'text'
     109         * which results in the '255' character issue
     110         * @param sql
     111         * @param db
     112         */
    105113        public static void changeTemplateTextFieldSignatures(sql, db) {
    106114                if (db == "org.postgresql.Driver") {
     
    111119                                try {
    112120                                        // change the datatype of text fields to text
    113                                         sql.execute("ALTER TABLE ${row.tablename} ALTER COLUMN template_text_fields_elt TYPE text")
    114                                         sql.execute("ALTER TABLE ${row.tablename} ALTER COLUMN template_text_fields_string TYPE 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")
    115123
    116124                                } catch (Exception e) {
Note: See TracChangeset for help on using the changeset viewer.