index all dates
[freeside.git] / FS / FS / Schema.pm
index 0bee832..571de27 100644 (file)
@@ -1436,9 +1436,9 @@ sub tables_hashref {
       'unique' => [],
       'index' => [ ['custnum'], ['pkgpart'], [ 'pkgbatch' ], [ 'locationnum' ],
                    [ 'usernum' ], [ 'agent_pkgid' ],
-                   [ 'start_date' ], ['setup'], ['last_bill'], ['bill'],
-                   ['susp'], ['adjourn'], ['expire'], ['cancel'],
-                   ['change_date'], ['order_date'],
+                   ['order_date'], [ 'start_date' ], ['setup'], ['bill'],
+                   ['last_bill'], ['susp'], ['adjourn'], ['cancel'],
+                   ['expire'], ['contract_end'], ['change_date'],
                  ],
     },
 
@@ -2551,6 +2551,7 @@ sub tables_hashref {
         'ratetimenum',     'int', 'NULL',     '', '', '',
         'classnum',        'int', 'NULL',     '', '', '', 
         'cdrtypenum',      'int', 'NULL',     '', '', '',
+        'region_group', 'char', 'NULL',       1, '', '', 
       ],
       'primary_key' => 'ratedetailnum',
       'unique'      => [ [ 'ratenum', 'orig_regionnum', 'dest_regionnum' ] ],
@@ -2789,7 +2790,7 @@ sub tables_hashref {
         # fields for unitel/RSLCOM/convergent that don't map well to asterisk
         # defaults
         # though these are now used elsewhere:
-        # charged_party, upstream_price, rated_price, carrierid
+        # charged_party, upstream_price, rated_price, carrierid, cdrtypenum
         ###
 
         #cdr_type: Usage = 1, S&E = 7, OC&C = 8
@@ -2835,10 +2836,14 @@ sub tables_hashref {
         #an indexed place to put big numbers
         'cdrid',         'bigint',     'NULL',     '',  '', '', 
 
+        #for taqua accountcode rewriting, for starters
+        'sessionnum',       'int',    'NULL',      '', '', '',
+        'subscriber',   'varchar',    'NULL', $char_d, '', '',
+
         #old
-        'cdrbatch', 'varchar', 'NULL', 255, '', '',
+        'cdrbatch',     'varchar',    'NULL',     255, '', '',
         #new
-        'cdrbatchnum', 'int', 'NULL', '', '', '',
+        'cdrbatchnum',      'int',    'NULL',      '', '', '',
 
       ],
       'primary_key' => 'acctid',
@@ -2846,6 +2851,7 @@ sub tables_hashref {
       'index' => [ [ 'calldate' ],
                    [ 'src' ], [ 'dst' ], [ 'dcontext' ], [ 'charged_party' ],
                    [ 'accountcode' ], [ 'carrierid' ], [ 'cdrid' ],
+                   [ 'sessionnum' ], [ 'subscriber' ],
                    [ 'freesidestatus' ], [ 'freesiderewritestatus' ],
                    [ 'cdrbatch' ], [ 'cdrbatchnum' ],
                  ],
@@ -3119,6 +3125,26 @@ sub tables_hashref {
       'index'  => [],
     },
     
+    'msa' => {
+      'columns' => [
+        'msanum',    'int',      '',      '', '', '', 
+        'description',   'varchar',    '',      $char_d, '', '', 
+      ],
+      'primary_key' => 'msanum',
+      'unique' => [],
+      'index'  => [],
+    },
+    
+    'rate_center' => {
+      'columns' => [
+        'ratecenternum',    'serial',      '',      '', '', '', 
+        'description',   'varchar',    '',      $char_d, '', '', 
+      ],
+      'primary_key' => 'ratecenternum',
+      'unique' => [],
+      'index'  => [],
+    },
+
     'did_vendor' => {
       'columns' => [
         'vendornum',    'serial',      '',      '', '', '', 
@@ -3133,10 +3159,10 @@ sub tables_hashref {
       'columns' => [
         'orderitemnum',    'serial',      '',      '', '', '', 
         'ordernum',    'int',      '',      '', '', '', 
-        'msa',        'varchar', 'NULL', $char_d, '', '',
+        'msanum',      'int',     'NULL',      '', '', '',
         'npa',      'int',     'NULL',      '', '', '',
         'latanum',      'int',     'NULL',      '', '', '',
-        'rate_center',        'varchar', 'NULL', $char_d, '', '',
+        'ratecenternum',      'int',     'NULL',      '', '', '',
         'state',       'char',    'NULL',       2, '', '', 
         'quantity',      'int',     '',      '', '', '',
       ],