[freeside-commits] branch FREESIDE_3_BRANCH updated. 03ff8c92b52a316f57be5639796015adc02ed299

Ivan ivan at 420.am
Tue May 14 22:50:48 PDT 2013


The branch, FREESIDE_3_BRANCH has been updated
       via  03ff8c92b52a316f57be5639796015adc02ed299 (commit)
      from  6fb1cac1d2cdadbc469438b5399875a915b5d81b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 03ff8c92b52a316f57be5639796015adc02ed299
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue May 14 22:50:47 2013 -0700

    bigserial (bigint) keys for queue tables and h_ tables of things that already have bigserial keys, RT#22566

diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index fb060f8..2967c83 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -236,6 +236,12 @@ sub dbdef_dist {
 
     }
 
+    my $historynum_type = ( $tableobj->column($tableobj->primary_key)->type
+                              =~ /^(bigserial|bigint|int8)$/i
+                                ? 'bigserial'
+                                : 'serial'
+                          );
+
     my $h_tableobj = DBIx::DBSchema::Table->new( {
       'name'          => "h_$table",
       'primary_key'   => 'historynum',
@@ -244,7 +250,7 @@ sub dbdef_dist {
       'columns'       => [
           DBIx::DBSchema::Column->new( {
             'name'    => 'historynum',
-            'type'    => 'serial',
+            'type'    => $historynum_type,
             'null'    => 'NOT NULL',
             'length'  => '',
             'default' => '',
@@ -1533,7 +1539,7 @@ sub tables_hashref {
         'gatewaynum',   'int',     'NULL',  '', '', '',
         #'cust_balance', @money_type,            '', '',
         'paynum',       'int',     'NULL',  '', '', '',
-        'jobnum',       'int',     'NULL',  '', '', '', 
+        'jobnum',    'bigint',     'NULL',  '', '', '', 
       ],
       'primary_key' => 'paypendingnum',
       'unique'      => [ [ 'payunique' ] ],
@@ -2664,7 +2670,7 @@ sub tables_hashref {
 
     'queue' => {
       'columns' => [
-        'jobnum',      'serial',     '',      '', '', '', 
+        'jobnum',   'bigserial',     '',      '', '', '', 
         'job',        'varchar',     '',     512, '', '', 
         '_date',          'int',     '',      '', '', '', 
         'status',     'varchar',     '', $char_d, '', '', 
@@ -2683,10 +2689,10 @@ sub tables_hashref {
 
     'queue_arg' => {
       'columns' => [
-        'argnum', 'serial', '', '', '', '', 
-        'jobnum', 'int', '', '', '', '', 
-        'frozen', 'char', 'NULL',       1, '', '',
-        'arg', 'text', 'NULL', '', '', '', 
+        'argnum', 'bigserial',     '', '', '', '', 
+        'jobnum',    'bigint',     '', '', '', '', 
+        'frozen',      'char', 'NULL',  1, '', '',
+        'arg',         'text', 'NULL', '', '', '', 
       ],
       'primary_key' => 'argnum',
       'unique'      => [],
@@ -2695,9 +2701,9 @@ sub tables_hashref {
 
     'queue_depend' => {
       'columns' => [
-        'dependnum', 'serial', '', '', '', '', 
-        'jobnum', 'int', '', '', '', '', 
-        'depend_jobnum', 'int', '', '', '', '', 
+        'dependnum',  'bigserial', '', '', '', '', 
+        'jobnum',        'bigint', '', '', '', '', 
+        'depend_jobnum', 'bigint', '', '', '', '', 
       ],
       'primary_key' => 'dependnum',
       'unique'      => [],

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/Schema.pm |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)




More information about the freeside-commits mailing list