X-Git-Url: http://git.pippins.net/embedvideo/.git/.%24link.?a=blobdiff_plain;f=bin%2Fupgrade_1_1_0_to_1_1_1;h=7936a7dfc6e374d2cb6b7083dd53843b2d374300;hb=HEAD;hp=6745e589250ddad82e43597afe7ef61411128574;hpb=61df0220f9c24a23b834d1fdf64c2a3630e52560;p=eq%2F.git diff --git a/bin/upgrade_1_1_0_to_1_1_1 b/bin/upgrade_1_1_0_to_1_1_1 index 6745e58..7936a7d 100755 --- a/bin/upgrade_1_1_0_to_1_1_1 +++ b/bin/upgrade_1_1_0_to_1_1_1 @@ -82,7 +82,17 @@ $sth->execute or die "-E- DB error: $DBI::errstr\n"; $sth = $dbh->prepare("ALTER TABLE `tc_leader` DROP `district`"); $sth->execute or die "-E- DB error: $DBI::errstr\n"; +# remove companion1 and companion2 from tc_visit +$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";