X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FSchema.pm;h=5f1611cf73a5c6221aa0d4b2824dcb0383ec18b1;hb=67a2ec7e476c9a78092f451cc1d1f2e09ac39700;hp=ed23d31b678d4f051cf215b00728cf45d661af5f;hpb=7c41eea8dca02a399739c29a0dfbda7efdd6df86;p=freeside.git diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index ed23d31b6..5f1611cf7 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' => '', @@ -261,12 +267,20 @@ sub dbdef_dist { DBIx::DBSchema::Column->new( { 'name' => 'history_user', 'type' => 'varchar', - 'null' => 'NOT NULL', + 'null' => 'NULL', 'length' => '80', 'default' => '', 'local' => '', } ), DBIx::DBSchema::Column->new( { + 'name' => 'history_usernum', + 'type' => 'int', + 'null' => 'NULL', + 'length' => '', + 'default' => '', + 'local' => '', + } ), + DBIx::DBSchema::Column->new( { 'name' => 'history_action', 'type' => 'varchar', 'null' => 'NOT NULL', @@ -1533,7 +1547,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 +2678,7 @@ sub tables_hashref { 'queue' => { 'columns' => [ - 'jobnum', 'serial', '', '', '', '', + 'jobnum', 'bigserial', '', '', '', '', 'job', 'varchar', '', 512, '', '', '_date', 'int', '', '', '', '', 'status', 'varchar', '', $char_d, '', '', @@ -2683,10 +2697,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 +2709,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' => [],