Changeset 1404 for trunk/grails-app


Ignore:
Timestamp:
Jan 18, 2011, 10:52:46 AM (10 years ago)
Author:
business@…
Message:

small fix

File:
1 edited

Legend:

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

    r1403 r1404  
    106106                if (db == "org.postgresql.Driver") {
    107107                        // check if any TEXT template fields are of type 'text'
    108                         sql.eachRow("SELECT columns.table_name FROM information_schema.columns WHERE columns.table_schema::text = 'public'::text AND column_name='template_text_fields_elt' AND data_type != 'text';")
     108                        sql.eachRow("SELECT columns.table_name as tablename FROM information_schema.columns WHERE columns.table_schema::text = 'public'::text AND column_name='template_text_fields_elt' AND data_type != 'text';")
    109109                        { row ->
    110                                 "performing database upgrade: ${row.table_name} template_text_fields_string/elt to text".grom()
     110                                "performing database upgrade: ${row.tablename} template_text_fields_string/elt to text".grom()
    111111                                try {
    112112                                        // change the datatype of study::description to text
    113                                         sql.execute("ALTER TABLE ${row.table_name} ALTER COLUMN template_text_fields_elt TYPE text")
    114                                         sql.execute("ALTER TABLE ${row.table_name} ALTER COLUMN template_text_fields_string TYPE 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")
    115115
    116116                                } catch (Exception e) {
Note: See TracChangeset for help on using the changeset viewer.