if ($importing_status ne '')
{
# add visit if it doesn't exist in tc_visit
- $sth = $dbh->prepare("insert into tc_visit values (NULL, '$family_id', '$comp_id', '', '', '$visit_date', '', '$importing_status', 'H')");
+ $sth = $dbh->prepare("insert into tc_visit values (NULL, '$family_id', '$comp_id', '$visit_date', '', '$importing_status', 'H')");
$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";
+
print "-> Done!\n";
shape = "record"
];
visit [
- label = "visit||<v> visit|<f> family|<c> companionship|<c1> companion1|<c2> companion2|<t> date|<n> notes|<v> visited|<vt> type"
+ label = "visit||<v> visit|<f> family|<c> companionship|<t> date|<n> notes|<v> visited|<vt> type"
shape = "record"
];
willingness [
visit:c -> companionship:c
visit:f -> family:f
- visit:c1 -> leader:i
- visit:c2 -> leader:i
willingness:i -> individual:i
willingness:a -> assignment:a
`visit` int(16) unsigned NOT NULL auto_increment,
`family` int(16) unsigned default NULL,
`companionship` int(16) unsigned default NULL,
- `companion1` int(16) unsigned default NULL,
- `companion2` int(16) unsigned default NULL,
`date` date default NULL,
`notes` text,
`visited` enum('y','n','') default NULL,