From 4481fcf5c87ede8676437afdcdedf2d2ad0c0e5a Mon Sep 17 00:00:00 2001 From: Yung Han Khoe Date: Thu, 10 Apr 2008 12:45:05 +0000 Subject: [PATCH] Converting Thingy's field types to upper case first --- docs/upgrades/upgrade_7.5.9-7.5.10.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/upgrades/upgrade_7.5.9-7.5.10.pl b/docs/upgrades/upgrade_7.5.9-7.5.10.pl index ab7dc881f..0195491a7 100644 --- a/docs/upgrades/upgrade_7.5.9-7.5.10.pl +++ b/docs/upgrades/upgrade_7.5.9-7.5.10.pl @@ -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 --------------------------------