Converting Thingy's field types to upper case first

This commit is contained in:
Yung Han Khoe 2008-04-10 12:45:05 +00:00
parent a6c72fbb2b
commit 4481fcf5c8

View file

@ -23,6 +23,7 @@ my $quiet; # this line required
my $session = start(); # this line required
privatizeVisitor($session);
ucfirstThingyFieldTypes($session);
finish($session); # this line required
@ -45,6 +46,15 @@ sub privatizeVisitor {
$visitor->profileField('ableToBeFriend', 0);
}
#----------------------------------------------------------------------------
sub ucfirstThingyFieldTypes {
my $session = shift;
print "\tConverting Thingy's fieldTypes to upper case first.\n" unless ($quiet);
$session->db->write("update Thingy_fields set fieldType = (SELECT CONCAT(UPPER(SUBSTRING(fieldType, 1, 1)), SUBSTRING(fieldType FROM 2)) ) where fieldType not like 'otherThing%'");
}
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------