From 4b94ceb350683f086a54ed56dbb966455b0bfedc Mon Sep 17 00:00:00 2001 From: Alan Pippin Date: Mon, 13 Sep 2010 13:28:29 -0600 Subject: [PATCH] Fixed missing AUTO INCREMENT property on some fields --- bin/upgrade_4_0_to_5_0 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/upgrade_4_0_to_5_0 b/bin/upgrade_4_0_to_5_0 index 4fabba9..f195223 100755 --- a/bin/upgrade_4_0_to_5_0 +++ b/bin/upgrade_4_0_to_5_0 @@ -72,7 +72,7 @@ $sth = $dbh->prepare("RENAME TABLE `eq_elder` TO `tc_indiv`"); $sth->execute or die "-E- DB error: $DBI::errstr\n"; # Change elder field in tc_indiv table to indiv -$sth = $dbh->prepare("ALTER TABLE `tc_indiv` CHANGE `elder` `indiv` INT(16)"); +$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 @@ -128,7 +128,7 @@ $sth = $dbh->prepare("ALTER TABLE `tc_interview` DROP `aaronic`"); $sth->execute or die "-E- DB error: $DBI::errstr\n"; # Change ppi field in tc_interview table to interview -$sth = $dbh->prepare("ALTER TABLE `tc_interview` CHANGE `ppi` `interview` INT(16)"); +$sth = $dbh->prepare("ALTER TABLE `tc_interview` CHANGE `ppi` `interview` INT(16) NOT NULL AUTO_INCREMENT"); $sth->execute or die "-E- DB error: $DBI::errstr\n"; # Add a new 'interview_type' column to the tc_interview table -- 2.34.1