Skip to content

Commit d672c3a

Browse files
committedDec 1, 2011
Add notifications to ther userProfileData => user move.
1 parent 3167e24 commit d672c3a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎share/upgrades/7.10.23-8.0.0/moveRequiredProfileFields.pl

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
toolbar uiLevel versionTagMode );
1313

1414
# Create the new columns
15+
report "Creating new columns in the user table";
1516
for my $fieldName ( @fields ) {
1617
my $field = WebGUI::ProfileField->new( session, $fieldName );
1718
my $fieldClass = $field->getFormControlClass;
@@ -21,13 +22,15 @@
2122
}
2223

2324
# Update the table
25+
report "Copying data for all users, this could take a while";
2426
my @pairs = map { q{`users`.`} . $_ . q{`=`userProfileData`.`} . $_ . q{`} } @fields;
2527
session->db->write(
2628
q{ UPDATE `users`,`userProfileData` SET } . join( ", ", @pairs ) .
2729
q{ WHERE `users`.`userId` = `userProfileData`.`userId` }
2830
);
2931

3032
# Drop the old tables
33+
report "Removing old columns";
3134
for my $fieldName ( @fields ) {
3235
session->db->write( qq{ ALTER TABLE userProfileData DROP COLUMN `$fieldName` } );
3336
}

0 commit comments

Comments
 (0)