From: Owen Leonard Date: Sun, 31 Oct 2010 23:35:12 +0000 (-0600) Subject: removed companion1 and companion2 from tc_visit X-Git-Url: http://git.pippins.net/embedvideo/images/%27%20%20%20%20.%20%24GLOBALS%5B%27phpgw%27%5D-%3Elink%28%27inc/jquery/static/%7Blink_attendance%7D?a=commitdiff_plain;h=14cfa28359cc338a5c0697981474bc88f0e008c1;p=eq%2F.git removed companion1 and companion2 from tc_visit --- diff --git a/bin/import_ward_data b/bin/import_ward_data index ae20ab7..2234b8a 100755 --- a/bin/import_ward_data +++ b/bin/import_ward_data @@ -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"; } } diff --git a/bin/upgrade_1_1_0_to_1_1_1 b/bin/upgrade_1_1_0_to_1_1_1 index 6745e58..21b6bed 100755 --- a/bin/upgrade_1_1_0_to_1_1_1 +++ b/bin/upgrade_1_1_0_to_1_1_1 @@ -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"; diff --git a/sql/schema.dot b/sql/schema.dot index a5a9139..136e253 100644 --- a/sql/schema.dot +++ b/sql/schema.dot @@ -55,7 +55,7 @@ digraph schema { shape = "record" ]; visit [ - label = "visit|| visit| family| companionship| companion1| companion2| date| notes| visited| type" + label = "visit|| visit| family| companionship| date| notes| visited| 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 diff --git a/sql/tc.jpg b/sql/tc.jpg index d523bc3..7885fed 100644 Binary files a/sql/tc.jpg and b/sql/tc.jpg differ diff --git a/sql/tc.sql b/sql/tc.sql index 9aaff5e..c54f74e 100644 --- a/sql/tc.sql +++ b/sql/tc.sql @@ -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,