changed note field in tc_accomplishment to notes
[eq/.git] / bin / upgrade_1_1_0_to_1_1_1
index 21b6bede198aafc54d07bf9e2e6c337f395991da..7936a7dfc6e374d2cb6b7083dd53843b2d374300 100755 (executable)
@@ -86,7 +86,13 @@ $sth->execute or die "-E- DB error: $DBI::errstr\n";
 $sth = $dbh->prepare("ALTER TABLE `tc_visit` DROP `companion1`, DROP `companion2`");
 $sth->execute or die "-E- DB error: $DBI::errstr\n";
 
+# change tc_interview so interviewer points to tc_leader.leader
+$sth = $dbh->prepare("UPDATE tc_interview AS ti JOIN tc_leader AS tl SET ti.interviewer=tl.leader WHERE ti.interviewer=tl.individual");
+$sth->execute or die "-E- DB error: $DBI::errstr\n";
 
+# rename note field in tc_accomplishment to notes
+$sth = $dbh->prepare("ALTER TABLE `tc_accomplishment` CHANGE `note` `notes` VARCHAR( 128 ) NOT NULL ");
+$sth->execute or die "-E- DB error: $DBI::errstr\n";
 
 print "-> Done!\n";