self-service support usage improvements (1733)
[freeside.git] / FS / FS / Schema.pm
index adc32a2..3084e36 100644 (file)
@@ -746,24 +746,28 @@ sub tables_hashref {
 
     'cust_pkg' => {
       'columns' => [
-        'pkgnum',    'serial',    '',   '', '', '', 
-        'custnum',   'int',    '',   '', '', '', 
-        'pkgpart',   'int',    '',   '', '', '', 
-        'otaker',    'varchar', '', 32, '', '', 
-        'setup',     @date_type, '', '', 
-        'bill',      @date_type, '', '', 
-        'last_bill', @date_type, '', '', 
-        'susp',      @date_type, '', '', 
-        'adjourn',   @date_type, '', '', 
-        'cancel',    @date_type, '', '', 
-        'expire',    @date_type, '', '', 
-        'manual_flag', 'char', 'NULL', 1, '', '', 
+        'pkgnum',         'serial',    '',   '', '', '', 
+        'custnum',        'int',    '',   '', '', '', 
+        'pkgpart',        'int',    '',   '', '', '', 
+        'otaker',         'varchar', '', 32, '', '', 
+        'setup',          @date_type, '', '', 
+        'bill',           @date_type, '', '', 
+        'last_bill',      @date_type, '', '', 
+        'susp',           @date_type, '', '', 
+        'adjourn',        @date_type, '', '', 
+        'cancel',         @date_type, '', '', 
+        'expire',         @date_type, '', '', 
+        'change_date',    @date_type, '', '',
+        'change_pkgnum',  'int', 'NULL', '', '', '',
+        'change_pkgpart', 'int', 'NULL', '', '', '',
+        'manual_flag',    'char', 'NULL', 1, '', '', 
       ],
       'primary_key' => 'pkgnum',
       'unique' => [],
       'index' => [ ['custnum'], ['pkgpart'],
                    ['setup'], ['last_bill'], ['bill'], ['susp'], ['adjourn'],
-                   ['expire'], ['cancel']
+                   ['expire'], ['cancel'],
+                   ['change_date'],
                  ],
     },
 
@@ -858,10 +862,12 @@ sub tables_hashref {
         'classnum',      'int',     'NULL', '', '', '', 
         'pay_weight',    'real',    'NULL', '', '', '',
         'credit_weight', 'real',    'NULL', '', '', '',
+        'agentnum',      'int',     'NULL', '', '', '', 
+
       ],
       'primary_key' => 'pkgpart',
       'unique' => [],
-      'index' => [ [ 'promo_code' ], [ 'disabled' ] ],
+      'index' => [ [ 'promo_code' ], [ 'disabled' ], [ 'agentnum' ], ],
     },
 
 #    'part_title' => {
@@ -896,7 +902,7 @@ sub tables_hashref {
       ],
       'primary_key' => 'refnum',
       'unique' => [],
-      'index' => [ ['disabled'] ],
+      'index' => [ ['disabled'], ['agentnum'], ],
     },
 
     'part_svc' => {
@@ -984,6 +990,20 @@ sub tables_hashref {
       'index' => [ ['username'], ['domsvc'] ],
     },
 
+    'acct_rt_transaction' => {
+      'columns' => [
+        'svcrtid',   'int',    '',   '', '', '', 
+        'svcnum',    'int',    '',   '', '', '', 
+        'transaction_id',       'int', '',   '', '', '', 
+        '_date',   @date_type, '', '',
+        'seconds',   'int', '',   '', '', '', #uhhhh
+        'support',   'int', '',   '', '', '',
+      ],
+      'primary_key' => 'svcrtid',
+      'unique' => [],
+      'index' => [ ['svcnum', 'transaction_id'] ],
+    },
+
     #'svc_charge' => {
     #  'columns' => [
     #    'svcnum',    'int',    '',   '',
@@ -1717,6 +1737,7 @@ sub tables_hashref {
         'usernum',     'int',       '', '', '', '',
         'prefname', 'varchar', '', $char_d, '', '', 
         'prefvalue', 'text', 'NULL', '', '', '', 
+        'expiration', @date_type, '', '',
       ],
       'primary_key' => 'prefnum',
       'unique' => [],