implement condition_sql for FS::part_event::Condition::cust_bill_hasnt_noauto, RT12714
authorlevinse <levinse>
Sun, 8 May 2011 20:09:05 +0000 (20:09 +0000)
committerlevinse <levinse>
Sun, 8 May 2011 20:09:05 +0000 (20:09 +0000)
FS/FS/Schema.pm
FS/FS/part_event/Condition/cust_bill_hasnt_noauto.pm

index 430efd9..da0bea0 100644 (file)
@@ -1452,7 +1452,7 @@ sub tables_hashref {
                    [ 'usernum' ], [ 'agent_pkgid' ],
                    ['order_date'], [ 'start_date' ], ['setup'], ['bill'],
                    ['last_bill'], ['susp'], ['adjourn'], ['cancel'],
-                   ['expire'], ['contract_end'], ['change_date'],
+                   ['expire'], ['contract_end'], ['change_date'], ['no_auto'],
                  ],
     },
 
@@ -1631,7 +1631,7 @@ sub tables_hashref {
       'primary_key' => 'pkgpart',
       'unique' => [],
       'index' => [ [ 'promo_code' ], [ 'disabled' ], [ 'classnum' ],
-                   [ 'agentnum' ],
+                   [ 'agentnum' ], ['no_auto'],
                  ],
     },
 
index bb0f3d0..0276255 100644 (file)
@@ -29,7 +29,6 @@ sub condition_sql {
   # XXX: can be made faster with optimizations?
   # -remove some/all sub-selects?
   # -remove the two main separate selects?
-  # -add indices on cust_pkg.no_auto and part_pkg.no_auto and others?
 
   "0 = (select count(1) from cust_pkg 
             where cust_pkg.no_auto = 'Y' and cust_pkg.pkgnum in