X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FSchema.pm;h=cbcd27b46ecde0dd34f82c956f33f883d11c0f1a;hb=e5d6af11f52aabe8c9e6e12ce43c3401ccf025a8;hp=fb1f1d69bd4742b4bb18f0a10707afc224bd3769;hpb=963b977d201a71e85781bcbf6732795728e9fc0f;p=freeside.git diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index fb1f1d69b..cbcd27b46 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -191,6 +191,7 @@ sub dbdef_dist { foreach my $table ( grep { ! /^clientapi_session/ && ! /^h_/ + && ! /^log(_context)?$/ && ! $tables_hashref_torrus->{$_} } $dbdef->tables @@ -804,13 +805,19 @@ sub tables_hashref { 'billpkgnum', 'int', '', '', '', '', 'taxnum', 'int', '', '', '', '', 'taxtype', 'varchar', '', $char_d, '', '', - 'pkgnum', 'int', '', '', '', '', - 'locationnum', 'int', '', '', '', '', #redundant? + 'pkgnum', 'int', '', '', '', '', #redundant + 'locationnum', 'int', '', '', '', '', #redundant 'amount', @money_type, '', '', + 'taxable_billpkgnum', 'int', 'NULL', '', '', '', ], 'primary_key' => 'billpkgtaxlocationnum', 'unique' => [], - 'index' => [ [ 'billpkgnum' ], [ 'taxnum' ], [ 'pkgnum' ], [ 'locationnum' ] ], + 'index' => [ [ 'billpkgnum' ], + [ 'taxnum' ], + [ 'pkgnum' ], + [ 'locationnum' ], + [ 'taxable_billpkgnum' ], + ], }, 'cust_bill_pkg_tax_rate_location' => { @@ -822,10 +829,12 @@ sub tables_hashref { 'locationtaxid', 'varchar', 'NULL', $char_d, '', '', 'taxratelocationnum', 'int', '', '', '', '', 'amount', @money_type, '', '', + 'taxable_billpkgnum', 'int', 'NULL', '', '', '', ], 'primary_key' => 'billpkgtaxratelocationnum', 'unique' => [], - 'index' => [ [ 'billpkgnum' ], [ 'taxnum' ], [ 'taxratelocationnum' ] ], + 'index' => [ [ 'billpkgnum' ], [ 'taxnum' ], [ 'taxratelocationnum' ], + [ 'taxable_billpkgnum' ], ], }, 'cust_bill_pkg_void' => { @@ -1010,6 +1019,7 @@ sub tables_hashref { 'latitude', 'decimal', 'NULL', '10,7', '', '', 'longitude','decimal', 'NULL', '10,7', '', '', 'coord_auto', 'char', 'NULL', 1, '', '', + 'addr_clean', 'char', 'NULL', 1, '', '', 'daytime', 'varchar', 'NULL', 20, '', '', 'night', 'varchar', 'NULL', 20, '', '', 'fax', 'varchar', 'NULL', 12, '', '', @@ -1028,6 +1038,7 @@ sub tables_hashref { 'ship_latitude', 'decimal', 'NULL', '10,7', '', '', 'ship_longitude','decimal', 'NULL', '10,7', '', '', 'ship_coord_auto', 'char', 'NULL', 1, '', '', + 'ship_addr_clean', 'char', 'NULL', 1, '', '', 'ship_daytime', 'varchar', 'NULL', 20, '', '', 'ship_night', 'varchar', 'NULL', 20, '', '', 'ship_fax', 'varchar', 'NULL', 12, '', '', @@ -1252,6 +1263,7 @@ sub tables_hashref { 'latitude', 'decimal', 'NULL', '10,7', '', '', 'longitude', 'decimal', 'NULL', '10,7', '', '', 'coord_auto', 'char', 'NULL', 1, '', '', + 'addr_clean', 'char', 'NULL', 1, '', '', 'country', 'char', '', 2, '', '', 'geocode', 'varchar', 'NULL', 20, '', '', 'district', 'varchar', 'NULL', 20, '', '', @@ -1548,7 +1560,14 @@ sub tables_hashref { 'depositor', 'varchar', 'NULL', $char_d, '', '', 'account', 'varchar', 'NULL', 20, '', '', 'teller', 'varchar', 'NULL', 20, '', '', + 'batchnum', 'int', 'NULL', '', '', '', #pay_batch foreign key + + # credit card/EFT fields (formerly in paybatch) + 'gatewaynum', 'int', 'NULL', '', '', '', # payment_gateway FK + 'processor', 'varchar', 'NULL', $char_d, '', '', # module name + 'auth', 'varchar','NULL',16, '', '', # CC auth number + 'order_number','varchar','NULL',$char_d, '', '', # transaction number ], 'primary_key' => 'paynum', #i guess not now, with cust_pay_pending, if we actually make it here, we _do_ want to record it# 'unique' => [ [ 'payunique' ] ], @@ -1579,6 +1598,12 @@ sub tables_hashref { 'teller', 'varchar', 'NULL', 20, '', '', 'batchnum', 'int', 'NULL', '', '', '', #pay_batch foreign key + # credit card/EFT fields (formerly in paybatch) + 'gatewaynum', 'int', 'NULL', '', '', '', # payment_gateway FK + 'processor', 'varchar', 'NULL', $char_d, '', '', # module name + 'auth', 'varchar','NULL',16, '', '', # CC auth number + 'order_number', 'varchar','NULL',$char_d, '', '', # transaction number + #void fields 'void_date', @date_type, '', '', 'reason', 'varchar', 'NULL', $char_d, '', '', @@ -1846,6 +1871,11 @@ sub tables_hashref { 'paymask', 'varchar', 'NULL', $char_d, '', '', 'paybatch', 'varchar', 'NULL', $char_d, '', '', 'closed', 'char', 'NULL', 1, '', '', + # credit card/EFT fields (formerly in paybatch) + 'gatewaynum', 'int', 'NULL', '', '', '', # payment_gateway FK + 'processor', 'varchar', 'NULL', $char_d, '', '', # module name + 'auth', 'varchar','NULL',16, '', '', # CC auth number + 'order_number', 'varchar','NULL',$char_d, '', '', # transaction number ], 'primary_key' => 'refundnum', 'unique' => [], @@ -2184,6 +2214,9 @@ sub tables_hashref { 'shell', 'varchar', 'NULL', $char_d, '', '', 'quota', 'varchar', 'NULL', $char_d, '', '', 'slipip', 'varchar', 'NULL', 15, '', '', #four TINYINTs, bah. + # IP address mgmt + 'routernum', 'int', 'NULL', '', '', '', + 'blocknum', 'int', 'NULL', '', '', '', 'seconds', 'int', 'NULL', '', '', '', #uhhhh 'seconds_threshold', 'int', 'NULL', '', '', '', 'upbytes', 'bigint', 'NULL', '', '', '', @@ -3249,7 +3282,7 @@ sub tables_hashref { 'channel', 'varchar', '', $char_d, \"''", '', 'dstchannel', 'varchar', '', $char_d, \"''", '', 'lastapp', 'varchar', '', $char_d, \"''", '', - 'lastdata', 'varchar', '', $char_d, \"''", '', + 'lastdata', 'varchar', '', 255, \"''", '', #currently only opensips 'src_ip_addr', 'varchar', 'NULL', 15, '', '', @@ -3948,16 +3981,17 @@ sub tables_hashref { 'index' => [ [ 'upgrade' ] ], }, - 'ftp_target' => { + 'upload_target' => { 'columns' => [ 'targetnum', 'serial', '', '', '', '', 'agentnum', 'int', 'NULL', '', '', '', + 'protocol', 'varchar', '', 10, '', '', 'hostname', 'varchar', '', $char_d, '', '', - 'port', 'int', '', '', '', '', + 'port', 'int', 'NULL', '', '', '', 'username', 'varchar', '', $char_d, '', '', - 'password', 'varchar', '', $char_d, '', '', - 'path', 'varchar', '', $char_d, '', '', - 'secure', 'char', 'NULL', 1, '', '', + 'password', 'varchar', 'NULL', $char_d, '', '', + 'path', 'varchar', 'NULL', $char_d, '', '', + 'subject', 'varchar', 'NULL', '255', '', '', 'handling', 'varchar', 'NULL', $char_d, '', '', ], 'primary_key' => 'targetnum', @@ -3965,6 +3999,32 @@ sub tables_hashref { 'index' => [], }, + 'log' => { + 'columns' => [ + 'lognum', 'serial', '', '', '', '', + '_date', 'int', '', '', '', '', + 'agentnum', 'int', 'NULL', '', '', '', + 'tablename', 'varchar', 'NULL', $char_d, '', '', + 'tablenum', 'int', 'NULL', '', '', '', + 'level', 'int', '', '', '', '', + 'message', 'text', '', '', '', '', + ], + 'primary_key' => 'lognum', + 'unique' => [], + 'index' => [ ['_date'], ['level'] ], + }, + + 'log_context' => { + 'columns' => [ + 'logcontextnum', 'serial', '', '', '', '', + 'lognum', 'int', '', '', '', '', + 'context', 'varchar', '', 32, '', '', + ], + 'primary_key' => 'logcontextnum', + 'unique' => [ [ 'lognum', 'context' ] ], + 'index' => [], + }, + %{ tables_hashref_torrus() }, # tables of ours for doing torrus virtual port combining