remove eqpres from tc_presidency table - just used the president field instead -...
[eq/.git] / bin / upgrade_4_0_to_5_0
index f1952234504a53eeb0be93c2790d1c217ba1b4b6..085fa1ec53fe4cc2af0866387cb972d7de5d62a0 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
@@ -151,6 +147,10 @@ $sth->execute or die "-E- DB error: $DBI::errstr\n";
 $sth = $dbh->prepare("ALTER TABLE `tc_presidency` CHANGE `elder` `indiv` INT(16)");
 $sth->execute or die "-E- DB error: $DBI::errstr\n";
 
+# Remove eqpres field from tc_presidency
+$sth = $dbh->prepare("ALTER TABLE `tc_presidency` DROP `eqpres`");
+$sth->execute or die "-E- DB error: $DBI::errstr\n";
+
 # Rename eq_visit table to tc_visit
 $sth = $dbh->prepare("RENAME TABLE `eq_visit` TO `tc_visit`");
 $sth->execute or die "-E- DB error: $DBI::errstr\n";