removing birthday field from tc_indiv since we don't use it and it is personal info
authorOwen Leonard <owen@balawis.leonard.fam>
Tue, 14 Sep 2010 01:47:10 +0000 (19:47 -0600)
committerOwen Leonard <owen@balawis.leonard.fam>
Tue, 14 Sep 2010 01:47:10 +0000 (19:47 -0600)
bin/import_ward_data
bin/parse_ward_data
bin/upgrade_4_0_to_5_0
doc/install.txt
mls/windowsGUI/MLSFileTrimmer/MLSRequiredFields.xml
sql/schema.dot
sql/tc.sql

index 909f3ba9490e7a47d63a8e714b773a05f216b46c..da32a0d873dd05996bf3b58bb9bea2a40bfe8e35 100755 (executable)
@@ -134,8 +134,6 @@ sub update_tc_indiv_table
                $hashref = $membership_data{$index};
                $id = $membership_data{$index}{'Indiv ID'};
                $indiv_name = $membership_data{$index}{'Preferred Name'};
-               $birthday = $membership_data{$index}{'Birth'};
-               $birthday =~ /(\d+) (\S+) (\d+)/; $day=$1; $month=$monthname2num{$2}; $year=$3;
                $address = $membership_data{$index}{'Street 1'};
                if($membership_data{$index}{'Street 2'} ne "") { 
                        $address .= " " . $membership_data{$index}{'Street 2'};
@@ -162,7 +160,7 @@ sub update_tc_indiv_table
                if($rows == 0) {
                        # No existing records found for this indiv, make a new entry
                        print "   Adding new indiv: $indiv_name\n";
-                       $sth = $dbh->prepare("insert into tc_indiv values (NULL,'$id',\"$indiv_name\",'$year-$month-$day','$address','$phone','$email','','$hhposition','$priesthood','','$default_interview_pri','','$default_interview_pri','',$attending,1)");
+                       $sth = $dbh->prepare("insert into tc_indiv values (NULL,'$id',\"$indiv_name\",'$address','$phone','$email','','$hhposition','$priesthood','','$default_interview_pri','','$default_interview_pri','',$attending,1)");
                        $sth->execute or die "-E- DB error: $DBI::errstr\n";
                } elsif($rows == 1) {
                        # An existing record was found for this indiv, update it
@@ -175,12 +173,6 @@ sub update_tc_indiv_table
                                $sth = $dbh->prepare("update tc_indiv set phone=NULL where name=\"$indiv_name\"");
                        }
                        $sth->execute or die "-E- DB error: $DBI::errstr\n";
-                       if($birthday ne "") { 
-                               $sth = $dbh->prepare("update tc_indiv set birthday='$year-$month-$day' where name=\"$indiv_name\"");
-                       } else {
-                               $sth = $dbh->prepare("update tc_indiv set birthday=NULL where name=\"$indiv_name\"");
-                       }
-                       $sth->execute or die "-E- DB error: $DBI::errstr\n";
                        if($address ne "") { 
                                $sth = $dbh->prepare("update tc_indiv set address='$address' where name=\"$indiv_name\"");
                        } else {
index aeca0223e920ab0cfc12c90e1fef0c74f839e09e..2a5848e56720362a92a8d089d7bfffca2ed5218b 100755 (executable)
@@ -10,20 +10,7 @@ else { require "db_config"; }
 
 %hometeaching_data = ();
 %membership_data = ();
-getopts('vsn:o:b');
-
-$monthname2num{'Jan'} = '01';
-$monthname2num{'Feb'} = '02';
-$monthname2num{'Mar'} = '03';
-$monthname2num{'Apr'} = '04';
-$monthname2num{'May'} = '05';
-$monthname2num{'Jun'} = '06';
-$monthname2num{'Jul'} = '07';
-$monthname2num{'Aug'} = '08';
-$monthname2num{'Sep'} = '09';
-$monthname2num{'Oct'} = '10';
-$monthname2num{'Nov'} = '11';
-$monthname2num{'Dec'} = '12';
+getopts('vsn:o');
 
 ######################################################################
 # SUBROUTINES
@@ -68,22 +55,6 @@ sub print_hash
        }
 }
 
-######################################################################
-sub print_birthdays
-{
-       my ($hashref) = @_;
-
-       foreach $key (sort {$a <=> $b} keys %$hashref) {
-               $name = "";
-               $birthday = "";
-               foreach $field (keys %{$hashref->{$key}}) {
-                       if($field =~ /Full Name/) { $name = $hashref->{$key}{$field}; }
-                       if($field =~ /Birth/) { $birthday = $hashref->{$key}{$field}; }
-               }
-               if($name ne "" && $birthday ne "") { printf "%-30s %-10s\n",$name,$birthday; }
-       }
-}
-
 ######################################################################
 # MAIN
 ######################################################################
@@ -112,8 +83,6 @@ if($opt_v) {
        &print_hash(\%hometeaching_data);
 }
 
-if($opt_b) { &print_birthdays(\%membership_data); }
-
 if($opt_s) { $dbh->disconnect(); exit; }
 
 ###################################################
index f1952234504a53eeb0be93c2790d1c217ba1b4b6..c27fa3ac4f2b1dd473001258455e89c8fd575ec2 100755 (executable)
@@ -75,12 +75,8 @@ $sth->execute or die "-E- DB error: $DBI::errstr\n";
 $sth = $dbh->prepare("ALTER TABLE `tc_indiv` CHANGE `elder` `indiv` INT(16) NOT NULL AUTO_INCREMENT");
 $sth->execute or die "-E- DB error: $DBI::errstr\n";
 
-# Add a new 'birthday' column to the tc_indiv table
-$sth = $dbh->prepare("ALTER TABLE `tc_indiv` ADD `birthday` DATE NULL DEFAULT NULL AFTER `name` ");
-$sth->execute or die "-E- DB error: $DBI::errstr\n";
-
 # Add a new 'address' column to the tc_indiv table
-$sth = $dbh->prepare("ALTER TABLE `tc_indiv` ADD `address` VARCHAR( 255 ) NULL DEFAULT NULL AFTER `birthday`");
+$sth = $dbh->prepare("ALTER TABLE `tc_indiv` ADD `address` VARCHAR( 255 ) NULL DEFAULT NULL AFTER `name`");
 $sth->execute or die "-E- DB error: $DBI::errstr\n";
 
 # Add a new 'family' column to the tc_indiv table
index 631af6e61fdc46517c9197d06913b444fd120029..47b7ef8aee85ff517cf4bba9f76a836499315017 100644 (file)
@@ -78,7 +78,6 @@ Requirements
      HofH ID
      Street 1
      Street 2
-     Birth
      Full Name
      Priesthood
      HH Position
index 02584f61594d7b8c7b763cbfe8b3964c2c4e4932..72d86d663a85aa7abd6769783554abfa500b5ef0 100644 (file)
@@ -10,7 +10,6 @@
       <MLSField>HofH ID</MLSField>\r
       <MLSField>Street 1</MLSField>\r
       <MLSField>Street 2</MLSField>\r
-      <MLSField>Birth</MLSField>\r
       <MLSField>Full Name</MLSField>\r
       <MLSField>Priesthood</MLSField>\r
       <MLSField>HH Position</MLSField>\r
index ee12da4683106b7f718c9ab99837e6cb61a23068..fa99b9a0cb2feda823046771b044b42616d4019b 100644 (file)
@@ -7,7 +7,7 @@ digraph schema {
     shape = "record"
   ];
   indiv   [
-    label = "<i> indiv||<id> indiv_id|<n> name|<b> birthday|<a> address|<p> phone|<em> email|<f> family|<hh> hh position|<po> priesthood|<st> steward|<pr> prospective|<pp> ppi_pri|<t> ppi_notes|<ip> int_pri|<in> int_notes|<a> attending|<v> valid"
+    label = "<i> indiv||<id> indiv_id|<n> name|<a> address|<p> phone|<em> email|<f> family|<hh> hh position|<po> priesthood|<st> steward|<pr> prospective|<pp> ppi_pri|<t> ppi_notes|<ip> int_pri|<in> int_notes|<a> attending|<v> valid"
     shape = "record"
   ];
   companionship   [
index 82e631b271ffcbb6b43f785d4cb37ec86ed658d6..f7cea2368c2bfa32d44103f549b97637869b530b 100644 (file)
@@ -109,7 +109,6 @@ CREATE TABLE `tc_indiv` (
   `indiv` int(16) unsigned NOT NULL auto_increment,
   `indiv_id` int(16) unsigned NOT NULL,
   `name` varchar(60) default NULL,
-  `birthday` date default NULL,
   `address` varchar(255) default NULL,
   `phone` varchar(12) default NULL,
   `email` varchar(120) default NULL,