RT# 81596 - fixed freeside-upgrade to not drop custom fields
[freeside.git] / FS / bin / freeside-upgrade
index c5ea933..0df3884 100755 (executable)
@@ -120,7 +120,7 @@ while ( $cf = $cfsth->fetchrow_hashref ) {
     my $name = $cf->{'name'};
     $name = lc($name) unless driver_name =~ /^mysql/i;
 
     my $name = $cf->{'name'};
     $name = lc($name) unless driver_name =~ /^mysql/i;
 
-    @statements = grep { $_ !~ /^\s*ALTER\s+TABLE\s+(h_|)$tbl\s+DROP\s+COLUMN\s+cf_$name\s*$/i }
+    @statements = grep { $_ !~ /^\s*ALTER\s+TABLE\s+(h_|)$tbl DROP\s+COLUMN\s+cf_$name/i }
                                                                     @statements;
     push @statements, 
         "ALTER TABLE $tbl ADD COLUMN cf_$name varchar(".$cf->{'length'}.")"
                                                                     @statements;
     push @statements, 
         "ALTER TABLE $tbl ADD COLUMN cf_$name varchar(".$cf->{'length'}.")"
@@ -449,8 +449,10 @@ Also performs other upgrade functions:
   [ -v ]: Run verbosely, sending debugging information to STDERR.  This is the
           current default.
 
   [ -v ]: Run verbosely, sending debugging information to STDERR.  This is the
           current default.
 
-  [ -s ]: Schema changes only.  Useful for Pg/slony slaves where the data
-          changes will be replicated from the Pg/slony master.
+  [ -s ]: Schema changes only.  Used to be useful for Pg/slony slaves where the
+          data changes would be replicated from the Pg/slony master (current
+          native Pg replication replicates schema changes to slaves
+          automatically).
 
   [ -r ]: Skip sqlradius updates.  Useful for occassions where the sqlradius
           databases may be inaccessible.
 
   [ -r ]: Skip sqlradius updates.  Useful for occassions where the sqlradius
           databases may be inaccessible.