X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FSchema.pm;h=56bdfc332c7a5f84afc27710dbf47d475c2109dc;hb=62e6a2b1c99086f3a9097f2d9d29fd8c414564b8;hp=486860ff6e9bec450c5b63a6d228a7dd01064682;hpb=d07c72046444319e0811c6a00b504885da091992;p=freeside.git diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index 486860ff6..56bdfc332 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -735,8 +735,9 @@ sub tables_hashref { #void fields 'void_date', @date_type, '', '', - 'reason', 'varchar', 'NULL', $char_d, '', '', - 'void_usernum', 'int', 'NULL', '', '', '', + 'reason', 'varchar', 'NULL', $char_d, '', '', + 'reasonnum', 'int', 'NULL', '', '', '', + 'void_usernum', 'int', 'NULL', '', '', '', ], 'primary_key' => 'invnum', 'unique' => [ [ 'custnum', 'agent_invid' ] ], #agentnum? huh @@ -750,6 +751,9 @@ sub tables_hashref { { columns => [ 'statementnum' ], table => 'cust_statement', #_void? both? }, + { columns => [ 'reasonnum' ], + table => 'reason', + }, { columns => [ 'void_usernum' ], table => 'access_user', references => [ 'usernum' ], @@ -1197,8 +1201,9 @@ sub tables_hashref { 'feepart', 'int', 'NULL', '', '', '', #void fields 'void_date', @date_type, '', '', - 'reason', 'varchar', 'NULL', $char_d, '', '', - 'void_usernum', 'int', 'NULL', '', '', '', + 'reason', 'varchar', 'NULL', $char_d, '', '', + 'reasonnum', 'int', 'NULL', '', '', '', + 'void_usernum', 'int', 'NULL', '', '', '', ], 'primary_key' => 'billpkgnum', 'unique' => [], @@ -1209,6 +1214,9 @@ sub tables_hashref { { columns => [ 'invnum' ], table => 'cust_bill_void', }, + { columns => [ 'reasonnum' ], + table => 'reason', + }, #pkgnum 0 and -1 are used for special things #{ columns => [ 'pkgnum' ], # table => 'cust_pkg', @@ -1649,6 +1657,7 @@ sub tables_hashref { 'po_number', 'varchar', 'NULL', $char_d, '', '', 'invoice_attn', 'varchar', 'NULL', $char_d, '', '', 'invoice_ship_address', 'char', 'NULL', 1, '', '', + 'postal_invoice', 'char', 'NULL', 1, '', '', ], 'primary_key' => 'custnum', 'unique' => [ [ 'agentnum', 'agent_custid' ] ], @@ -1804,6 +1813,7 @@ sub tables_hashref { '_password', 'varchar', 'NULL', $char_d, '', '', '_password_encoding', 'varchar', 'NULL', $char_d, '', '', 'disabled', 'char', 'NULL', 1, '', '', + 'invoice_dest', 'char', 'NULL', 1, '', '', ], 'primary_key' => 'contactnum', 'unique' => [], @@ -1962,13 +1972,31 @@ sub tables_hashref { ], }, + 'quotation_pkg_detail' => { + 'columns' => [ + 'detailnum', 'serial', '', '', '', '', + 'quotationpkgnum', 'int', '', '', '', '', + 'format', 'char', 'NULL', 1, '', '', # not used for anything + 'detail', 'varchar', '', 255, '', '', + ], + 'primary_key' => 'detailnum', + 'unique' => [], + 'index' => [ [ 'quotationpkgnum' ] ], + 'foreign_keys' => [ + { columns => [ 'quotationpkgnum' ], + table => 'quotation_pkg', + references => [ 'quotationpkgnum' ], + }, + ], + }, + 'quotation_pkg_discount' => { 'columns' => [ 'quotationpkgdiscountnum', 'serial', '', '', '', '', 'quotationpkgnum', 'int', '', '', '', '', 'discountnum', 'int', '', '', '', '', - 'setup_amount', @money_typen, '', '', - 'recur_amount', @money_typen, '', '', + 'setuprecur', 'varchar', 'NULL', $char_d, '', '', + 'amount', @money_typen, '', '', #'end_date', @date_type, '', '', ], 'primary_key' => 'quotationpkgdiscountnum', @@ -2505,6 +2533,7 @@ sub tables_hashref { #void fields 'void_date', @date_type, '', '', 'reason', 'varchar', 'NULL', $char_d, '', '', + 'reasonnum', 'int', 'NULL', '', '', '', 'void_usernum', 'int', 'NULL', '', '', '', ], 'primary_key' => 'paynum', @@ -2526,6 +2555,9 @@ sub tables_hashref { { columns => [ 'gatewaynum' ], table => 'payment_gateway', }, + { columns => [ 'reasonnum' ], + table => 'reason', + }, { columns => [ 'void_usernum' ], table => 'access_user', references => [ 'usernum' ], @@ -2888,6 +2920,7 @@ sub tables_hashref { 'otaker', 'varchar', 'NULL', 32, '', '', 'usernum', 'int', 'NULL', '', '', '', 'disabled', 'char', 'NULL', 1, '', '', + 'setuprecur', 'char', 'NULL', 5, '', '', ], 'primary_key' => 'pkgdiscountnum', 'unique' => [], @@ -4454,6 +4487,8 @@ sub tables_hashref { 'exporttype', 'varchar', '', $char_d, '', '', 'nodomain', 'char', 'NULL', 1, '', '', 'default_machine','int', 'NULL', '', '', '', + 'no_suspend', 'char', 'NULL', 1, '', '', + # could also have 'no_insert', 'no_replace', etc. ], 'primary_key' => 'exportnum', 'unique' => [], @@ -6544,6 +6579,25 @@ sub tables_hashref { ], }, + 'log_email' => { + 'columns' => [ + 'logemailnum', 'serial', '', '', '', '', + 'context', 'varchar', 'NULL', $char_d, '', '', + 'min_level', 'int', 'NULL', '', '', '', + 'msgnum', 'int', '', '', '', '', + 'to_addr', 'varchar', 'NULL', 255, '', '', + ], + 'primary_key' => 'logemailnum', + 'unique' => [], + 'index' => [ ['context'], ['min_level'] ], + 'foreign_keys' => [ + { columns => [ 'msgnum' ], + table => 'msg_template', + references => [ 'msgnum' ], + }, + ], + }, + 'svc_alarm' => { 'columns' => [ # name type null length default local @@ -6818,6 +6872,52 @@ sub tables_hashref { ], }, + 'svc_fiber' => { + 'columns' => [ + 'svcnum', 'int', '', '', '', '', + 'oltnum', 'int', 'NULL', '', '', '', + 'shelf', 'int', 'NULL', '', '', '', + 'card', 'int', 'NULL', '', '', '', + 'olt_port', 'int', 'NULL', '', '', '', + 'ont_id', 'int', 'NULL', '', '', '', + 'ont_typenum', 'int', 'NULL', '', '', '', + 'ont_serial', 'varchar', 'NULL', $char_d, '', '', + 'ont_port', 'varchar', 'NULL', 16, '', '', + 'vlan', 'int', 'NULL', '', '', '', + 'signal', 'int', 'NULL', '', '', '', + 'speed_up', 'int', 'NULL', '', '', '', + 'speed_down', 'int', 'NULL', '', '', '', + 'ont_install','varchar', 'NULL', $char_d, '', '', + ], + 'primary_key' => 'svcnum', + 'unique' => [ ], + 'index' => [ [ 'ont_serial' ] ], + 'foreign_keys' => [ + { columns => [ 'svcnum' ], + table => 'cust_svc', + }, + { columns => [ 'oltnum' ], + table => 'fiber_olt', + }, + { columns => [ 'ont_typenum' ], + table => 'hardware_type', + references => [ 'typenum' ], + }, + ], + }, + + 'fiber_olt' => { + 'columns' => [ + 'oltnum', 'serial', '', '', '', '', + 'oltname', 'varchar', '', $char_d, '', '', + 'serial', 'varchar', '', $char_d, '', '', + 'disabled', 'char', 'NULL', 1, '', '', + ], + 'primary_key' => 'oltnum', + 'unique' => [ ], + 'index' => [ ], + }, + 'vend_main' => { 'columns' => [ 'vendnum', 'serial', '', '', '', '', @@ -7156,6 +7256,52 @@ sub tables_hashref { ], }, + 'password_history' => { + 'columns' => [ + 'passwordnum', 'serial', '', '', '', '', + '_password', 'varchar', 'NULL', $char_d, '', '', + 'encryption_method', 'varchar', 'NULL', $char_d, '', '', + 'created', @date_type, '', '', + # each table that needs password history gets a column here, and + # an entry in foreign_keys. + 'svc_acct__svcnum', 'int', 'NULL', '', '', '', + 'svc_dsl__svcnum', 'int', 'NULL', '', '', '', + 'svc_alarm__svcnum', 'int', 'NULL', '', '', '', + 'agent__agentnum', 'int', 'NULL', '', '', '', + 'contact__contactnum', 'int', 'NULL', '', '', '', + 'access_user__usernum', 'int', 'NULL', '', '', '', + ], + 'primary_key' => 'passwordnum', + 'unique' => [], + 'index' => [], + 'foreign_keys' => [ + { columns => [ 'svc_acct__svcnum' ], + table => 'svc_acct', + references => [ 'svcnum' ], + }, + { columns => [ 'svc_dsl__svcnum' ], + table => 'svc_dsl', + references => [ 'svcnum' ], + }, + { columns => [ 'svc_alarm__svcnum' ], + table => 'svc_alarm', + references => [ 'svcnum' ], + }, + { columns => [ 'agent__agentnum' ], + table => 'agent', + references => [ 'agentnum' ], + }, + { columns => [ 'contact__contactnum' ], + table => 'contact', + references => [ 'contactnum' ], + }, + { columns => [ 'access_user__usernum' ], + table => 'access_user', + references => [ 'usernum' ], + }, + ], + }, + # name type nullability length default local #'new_table' => {