[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 4c989c092b2db59669dd0829daf04d354a7e4017
Ivan
ivan at 420.am
Tue May 14 22:50:49 PDT 2013
The branch, FREESIDE_2_3_BRANCH has been updated
via 4c989c092b2db59669dd0829daf04d354a7e4017 (commit)
from a082dc9deaaaf138bda355c594a470d08edf6e9e (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 4c989c092b2db59669dd0829daf04d354a7e4017
Author: Ivan Kohler <ivan at freeside.biz>
Date: Tue May 14 22:50:49 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 7456f69..d4e35ec 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' => '',
@@ -1345,7 +1351,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' ] ],
@@ -2355,7 +2361,7 @@ sub tables_hashref {
'queue' => {
'columns' => [
- 'jobnum', 'serial', '', '', '', '',
+ 'jobnum', 'bigserial', '', '', '', '',
'job', 'varchar', '', 512, '', '',
'_date', 'int', '', '', '', '',
'status', 'varchar', '', $char_d, '', '',
@@ -2374,10 +2380,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' => [],
@@ -2386,9 +2392,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