From d672c3a221284c166c50c629eea8bccbcba2b9de Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 1 Dec 2011 13:25:49 -0800 Subject: [PATCH] Add notifications to ther userProfileData => user move. --- share/upgrades/7.10.23-8.0.0/moveRequiredProfileFields.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/upgrades/7.10.23-8.0.0/moveRequiredProfileFields.pl b/share/upgrades/7.10.23-8.0.0/moveRequiredProfileFields.pl index fbf6df09f..b184dd6bc 100644 --- a/share/upgrades/7.10.23-8.0.0/moveRequiredProfileFields.pl +++ b/share/upgrades/7.10.23-8.0.0/moveRequiredProfileFields.pl @@ -12,6 +12,7 @@ my @fields = qw( ableToBeFriend alias allowPrivateMessages avatar cellPhone date toolbar uiLevel versionTagMode ); # Create the new columns +report "Creating new columns in the user table"; for my $fieldName ( @fields ) { my $field = WebGUI::ProfileField->new( session, $fieldName ); my $fieldClass = $field->getFormControlClass; @@ -21,6 +22,7 @@ for my $fieldName ( @fields ) { } # Update the table +report "Copying data for all users, this could take a while"; my @pairs = map { q{`users`.`} . $_ . q{`=`userProfileData`.`} . $_ . q{`} } @fields; session->db->write( q{ UPDATE `users`,`userProfileData` SET } . join( ", ", @pairs ) . @@ -28,6 +30,7 @@ session->db->write( ); # Drop the old tables +report "Removing old columns"; for my $fieldName ( @fields ) { session->db->write( qq{ ALTER TABLE userProfileData DROP COLUMN `$fieldName` } ); }