Changeset 1249 for trunk/grails-app/conf
- Timestamp:
- Dec 9, 2010, 4:17:40 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/DatabaseUpgrade.groovy
r1248 r1249 20 20 */ 21 21 public static void handleUpgrades(dataSource) { 22 // gromming debug message23 "handeling database upgrades".grom()24 25 22 // get a sql instance 26 23 groovy.sql.Sql sql = new groovy.sql.Sql(dataSource) 27 24 28 // check for study description change from template 29 // to required domain field (r1245 and r1246) 30 changeStudyDescription(sql) 25 // execute per-change check and upgrade code 26 changeStudyDescription(sql) // r1245 / r1246 31 27 } 32 28 … … 43 39 // database upgrade required 44 40 try { 45 println "PERFORMING DATABASE UPGRADE!!!"46 41 // get the template field id 47 42 def id = sql.firstRow("SELECT id FROM template_field WHERE templatefieldentity='dbnp.studycapturing.Study' AND templatefieldname='Description'").id … … 59 54 60 55 // delete all obsolete descriptions 61 //sql.execute("DELETE FROM study_template_text_fields WHERE template_text_fields_idx='Description'")56 sql.execute("DELETE FROM study_template_text_fields WHERE template_text_fields_idx='Description'") 62 57 63 58 // and delete the obsolete template field 64 //sql.execute("DELETE FROM template_field WHERE id=${id}")59 sql.execute("DELETE FROM template_field WHERE id=${id}") 65 60 } catch (Exception e) { 66 61 "changeStudyDescription database upgrade failed: " + e.getMessage()
Note: See TracChangeset
for help on using the changeset viewer.