Changeset 1574


Ignore:
Timestamp:
Feb 28, 2011, 12:13:55 PM (6 years ago)
Author:
work@…
Message:
  • updated mapping name column constraint database upgrade function to be more in line with the rest
File:
1 edited

Legend:

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

    r1535 r1574  
    185185                   try {
    186186                // Check if constraint still exists
    187                 if (sql.firstRow("SELECT * FROM pg_constraint WHERE contype='mapping_column_name_key'"))
     187                if (sql.firstRow("SELECT * FROM pg_constraint WHERE contype='mapping_column_name_key'")) {
     188                        println "performing database upgrade: mapping column name constraint"
    188189                    sql.execute("ALTER TABLE mapping_column DROP CONSTRAINT mapping_column_name_key")
    189                 else
    190                     println "changeMappingColumnNameConstraint exiting, constraint doesn't exist"
    191 
     190                                }
    192191                   } catch (Exception e) {
    193192                           println "changeMappingColumnNameConstraint `name` field unique constraint couldn't be dropped: " + e.getMessage()
Note: See TracChangeset for help on using the changeset viewer.