[freeside-commits] branch master updated. b2223120f597028442998ac1eed9165ad82a001c

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


The branch, master has been updated
       via  b2223120f597028442998ac1eed9165ad82a001c (commit)
      from  326bef027d6eaa521825f72ee26f10f087f71cf8 (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 b2223120f597028442998ac1eed9165ad82a001c
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue May 14 22:50:46 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 ed23d31..1da302d 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