removed companion1 and companion2 from tc_visit
authorOwen Leonard <owen@balawis.leonard.fam>
Sun, 31 Oct 2010 23:35:12 +0000 (17:35 -0600)
committerOwen Leonard <owen@balawis.leonard.fam>
Sun, 31 Oct 2010 23:35:12 +0000 (17:35 -0600)
bin/import_ward_data
bin/upgrade_1_1_0_to_1_1_1
sql/schema.dot
sql/tc.jpg
sql/tc.sql

index ae20ab741372e1fe42dcf13024ed49d6e96dfe63..2234b8a2e63ae3901bda8c6421c51fd2fa53228b 100755 (executable)
@@ -615,7 +615,7 @@ sub update_tc_visit_table
                                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";
                                }
                        }
index 6745e589250ddad82e43597afe7ef61411128574..21b6bede198aafc54d07bf9e2e6c337f395991da 100755 (executable)
@@ -82,6 +82,10 @@ $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";
index a5a91392cab6a212482cba5a9e0b396044a4b243..136e25338e737ae545856c7d0a32272a9f6ee412 100644 (file)
@@ -55,7 +55,7 @@ digraph schema {
     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   [
@@ -133,8 +133,6 @@ digraph schema {
 
   visit:c         -> companionship:c
   visit:f         -> family:f
-  visit:c1        -> leader:i
-  visit:c2        -> leader:i
 
   willingness:i   -> individual:i
   willingness:a   -> assignment:a
index d523bc38b0f09794857d34bc04c388d8fd3e7dc0..7885fed7128fea360249864b0d1b93c4433a8221 100644 (file)
Binary files a/sql/tc.jpg and b/sql/tc.jpg differ
index 9aaff5ea88d60bab34c31e3f5ceb3462edeaf34c..c54f74e7dcd5fa4abd5d5366f04e9b91d3514afe 100644 (file)
@@ -175,8 +175,6 @@ CREATE TABLE /*!42501 IF NOT EXISTS*/ `tc_visit` (
   `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,