RT#18834: Cacti integration [database storage]
[freeside.git] / FS / FS / Schema.pm
index fc56d90..839a971 100644 (file)
@@ -203,6 +203,7 @@ sub dbdef_dist {
            && ! /^legacy_cust_history$/
            && ( ! /^queue(_arg|_depend|_stat)?$/ || ! $opt->{'queue-no_history'} )
            && ! $tables_hashref_torrus->{$_}
+           && ! /^cacti_graph$/
          }
       $dbdef->tables
   ) {
@@ -1151,6 +1152,7 @@ sub tables_hashref {
         'amount',                 @money_type,                   '', '',
         'currency',                    'char', 'NULL',        3, '', '',
         'taxable_billpkgnum',           'int', 'NULL',       '', '', '',
+        'taxclass',                 'varchar', 'NULL',       10, '', '',
       ],
       'primary_key'  => 'billpkgtaxratelocationnum',
       'unique'       => [],
@@ -2616,6 +2618,7 @@ sub tables_hashref {
         'download',       @date_type,     '', '', 
         'upload',         @date_type,     '', '', 
         'title',   'varchar', 'NULL',255, '', '',
+        'processor_id',   'varchar', 'NULL',255, '', '',
       ],
       'primary_key'  => 'batchnum',
       'unique'       => [],
@@ -4533,6 +4536,7 @@ sub tables_hashref {
         #'custnum',      'int', '', '', '', ''
         'billpkgnum',   'int', '', '', '', '', 
         'taxnum',       'int', '', '', '', '', 
+        'taxtype',  'varchar', 'NULL', $char_d, '', '',
         'year',         'int', 'NULL', '', '', '', 
         'month',        'int', 'NULL', '', '', '', 
         'creditbillpkgnum', 'int', 'NULL', '', '', '',
@@ -4548,16 +4552,13 @@ sub tables_hashref {
       'unique'       => [],
       'index'        => [ [ 'taxnum', 'year', 'month' ],
                           [ 'billpkgnum' ],
-                          [ 'taxnum' ],
+                          [ 'taxnum', 'taxtype' ],
                           [ 'creditbillpkgnum' ],
                         ],
       'foreign_keys' => [
                           { columns    => [ 'billpkgnum' ],
                             table      => 'cust_bill_pkg',
                           },
-                          { columns    => [ 'taxnum' ],
-                            table      => 'cust_main_county',
-                          },
                           { columns    => [ 'creditbillpkgnum' ],
                             table      => 'cust_credit_bill_pkg',
                           },
@@ -4570,6 +4571,7 @@ sub tables_hashref {
         #'custnum',      'int', '', '', '', ''
         'billpkgnum',   'int', '', '', '', '', 
         'taxnum',       'int', '', '', '', '', 
+        'taxtype',  'varchar', 'NULL', $char_d, '', '',
         'year',         'int', 'NULL', '', '', '', 
         'month',        'int', 'NULL', '', '', '', 
         'creditbillpkgnum', 'int', 'NULL', '', '', '',
@@ -4585,7 +4587,7 @@ sub tables_hashref {
       'unique'       => [],
       'index'        => [ [ 'taxnum', 'year', 'month' ],
                           [ 'billpkgnum' ],
-                          [ 'taxnum' ],
+                          [ 'taxnum', 'taxtype' ],
                           [ 'creditbillpkgnum' ],
                         ],
       'foreign_keys' => [
@@ -7006,9 +7008,29 @@ sub tables_hashref {
                         ],
     },
 
-
-
-
+    'cacti_page' => {
+      'columns' => [
+        'cacti_pagenum',  'serial',   '',     '', '', '',
+        'exportnum',      'int',      'NULL', '', '', '',
+        'svcnum',         'int',      'NULL', '', '', '', 
+        'graphnum',       'int',      'NULL', '', '', '', 
+        'imported',       @date_type,             '', '',
+        'content',        'text',     'NULL', '', '', '',
+      ],
+      'primary_key' => 'cacti_pagenum',
+      'unique'  => [ ],
+      'index'   => [ ['svcnum'], ['imported'] ],
+      'foreign_keys' => [
+                          { columns    => [ 'svcnum' ],
+                            table      => 'cust_svc',
+                            references => [ 'svcnum' ],
+                          },
+                          { columns    => [ 'exportnum' ],
+                            table      => 'part_export',
+                            references => [ 'exportnum' ],
+                          },
+                        ],
+    },
 
     # name type nullability length default local