[freeside-commits] freeside/FS/FS Schema.pm,1.307,1.308

Ivan,,, ivan at wavetail.420.am
Mon Jun 20 19:55:45 PDT 2011


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv6542

Modified Files:
	Schema.pm 
Log Message:
remove unnecessary/bloating indices on h_cust_event, RT#13337

Index: Schema.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Schema.pm,v
retrieving revision 1.307
retrieving revision 1.308
diff -u -w -d -r1.307 -r1.308
--- Schema.pm	21 Jun 2011 01:04:55 -0000	1.307
+++ Schema.pm	21 Jun 2011 02:55:43 -0000	1.308
@@ -197,9 +197,13 @@
     my $tableobj = $dbdef->table($table)
       or die "unknown table $table";
 
+    my %h_indices = ();
+
+    unless ( $table eq 'cust_event' ) { #others?
+
     my %indices = $tableobj->indices;
     
-    my %h_indices = map { 
+      %h_indices = map { 
                           ( "h_$_" =>
                               DBIx::DBSchema::Index->new({
                                 'name'    => 'h_'. $indices{$_}->name,
@@ -210,7 +214,8 @@
                         }
                         keys %indices;
 
-    $h_indices{"h_${table}_srckey"} = DBIx::DBSchema::Index->new({
+      $h_indices{"h_${table}_srckey"} =
+        DBIx::DBSchema::Index->new({
                                         'name'    => "h_${table}_srckey",
                                         'unique'  => 0,
                                         'columns' => [ 'history_action', #right?
@@ -218,7 +223,8 @@
                                                      ],
                                       });
 
-    $h_indices{"h_${table}_srckey2"} = DBIx::DBSchema::Index->new({
+      $h_indices{"h_${table}_srckey2"} =
+         DBIx::DBSchema::Index->new({
                                          'name'    => "h_${table}_srckey2",
                                          'unique'  => 0,
                                          'columns' => [ 'history_date',
@@ -226,6 +232,8 @@
                                                       ],
                                        });
 
+    }
+
     my $h_tableobj = DBIx::DBSchema::Table->new( {
       'name'          => "h_$table",
       'primary_key'   => 'historynum',



More information about the freeside-commits mailing list