X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FSchema.pm;h=2c26ba2715cea015e602ba923e59e89dcd580ada;hb=f3c4bc88460be7576d81b9ca234b421950f48c01;hp=ea02dfebfeed925d5219220b86089bc6f0ab32eb;hpb=3050434f62122e73d748dac26a5e70193b444c0a;p=freeside.git diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index ea02dfebf..2c26ba271 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -319,6 +319,7 @@ sub tables_hashref { 'weight', 'int', '', '', '', '', 'plan', 'varchar', 'NULL', $char_d, '', '', 'plandata', 'text', 'NULL', '', '', '', + 'reason', 'int', 'NULL', '', '', '', 'disabled', 'char', 'NULL', 1, '', '', ], 'primary_key' => 'eventpart', @@ -407,7 +408,10 @@ sub tables_hashref { # 'middle', 'varchar', 'NULL', $char_d, '', '', 'first', 'varchar', '', $char_d, '', '', 'ss', 'varchar', 'NULL', 11, '', '', - 'birthdate',@date_type, '', '', + 'stateid', 'varchar', 'NULL', $char_d, '', '', + 'stateid_state', 'varchar', 'NULL', $char_d, '', '', + 'birthdate' ,@date_type, '', '', + 'signupdate',@date_type, '', '', 'company', 'varchar', 'NULL', $char_d, '', '', 'address1', 'varchar', '', $char_d, '', '', 'address2', 'varchar', 'NULL', $char_d, '', '', @@ -450,6 +454,7 @@ sub tables_hashref { 'referral_custnum', 'int', 'NULL', '', '', '', 'comments', 'text', 'NULL', '', '', '', 'spool_cdr','char', 'NULL', 1, '', '', + 'invoice_terms', 'varchar', 'NULL', $char_d, '', '', ], 'primary_key' => 'custnum', 'unique' => [ [ 'agentnum', 'agent_custid' ] ], @@ -518,7 +523,8 @@ sub tables_hashref { 'payby', 'char', '', 4, '', '', # CARD/BILL/COMP, should be # index into payby table # eventually - 'payinfo', 'varchar', 'NULL', $char_d, '', '', #see cust_main above + 'payinfo', 'varchar', 'NULL', 512, '', '', #see cust_main above + 'paymask', 'varchar', 'NULL', $char_d, '', '', 'paybatch', 'varchar', 'NULL', $char_d, '', '', #for auditing purposes. 'closed', 'char', 'NULL', 1, '', '', ], @@ -536,7 +542,8 @@ sub tables_hashref { 'payby', 'char', '', 4, '', '', # CARD/BILL/COMP, should be # index into payby table # eventually - 'payinfo', 'varchar', 'NULL', $char_d, '', '', #see cust_main above + 'payinfo', 'varchar', 'NULL', 512, '', '', #see cust_main above + 'paymask', 'varchar', 'NULL', $char_d, '', '', 'paybatch', 'varchar', 'NULL', $char_d, '', '', #for auditing purposes. 'closed', 'char', 'NULL', 1, '', '', 'void_date', @date_type, '', '', @@ -592,6 +599,7 @@ sub tables_hashref { 'pay_batch' => { #batches of payments to an external processor 'columns' => [ 'batchnum', 'serial', '', '', '', '', + 'payby', 'char', '', 4, '', '', # CARD/CHEK 'status', 'char', 'NULL', 1, '', '', 'download', @date_type, '', '', 'upload', @date_type, '', '', @@ -649,6 +657,31 @@ sub tables_hashref { 'index' => [ ['custnum'], ['pkgpart'] ], }, + 'cust_pkg_option' => { + 'columns' => [ + 'optionnum', 'serial', '', '', '', '', + 'pkgnum', 'int', '', '', '', '', + 'optionname', 'varchar', '', $char_d, '', '', + 'optionvalue', 'text', 'NULL', '', '', '', + ], + 'primary_key' => 'optionnum', + 'unique' => [], + 'index' => [ [ 'pkgnum' ], [ 'optionname' ] ], + }, + + 'cust_pkg_reason' => { + 'columns' => [ + 'num', 'serial', '', '', '', '', + 'pkgnum', 'int', '', '', '', '', + 'reasonnum','int', '', '', '', '', + 'otaker', 'varchar', '', 32, '', '', + 'date', @date_type, '', '', + ], + 'primary_key' => 'num', + 'unique' => [], + 'index' => [], + }, + 'cust_refund' => { 'columns' => [ 'refundnum', 'serial', '', '', '', '', @@ -661,7 +694,8 @@ sub tables_hashref { 'payby', 'char', '', 4, '', '', # CARD/BILL/COMP, should # be index into payby # table eventually - 'payinfo', 'varchar', 'NULL', $char_d, '', '', #see cust_main above + 'payinfo', 'varchar', 'NULL', 512, '', '', #see cust_main above + 'paymask', 'varchar', 'NULL', $char_d, '', '', 'paybatch', 'varchar', 'NULL', $char_d, '', '', 'closed', 'char', 'NULL', 1, '', '', ], @@ -697,20 +731,22 @@ sub tables_hashref { 'part_pkg' => { 'columns' => [ - 'pkgpart', 'serial', '', '', '', '', - 'pkg', 'varchar', '', $char_d, '', '', - 'comment', 'varchar', '', $char_d, '', '', - 'promo_code', 'varchar', 'NULL', $char_d, '', '', - 'setup', @perl_type, '', '', - 'freq', 'varchar', '', $char_d, '', '', #billing frequency - 'recur', @perl_type, '', '', - 'setuptax', 'char', 'NULL', 1, '', '', - 'recurtax', 'char', 'NULL', 1, '', '', - 'plan', 'varchar', 'NULL', $char_d, '', '', - 'plandata', 'text', 'NULL', '', '', '', - 'disabled', 'char', 'NULL', 1, '', '', - 'taxclass', 'varchar', 'NULL', $char_d, '', '', - 'classnum', 'int', 'NULL', '', '', '', + 'pkgpart', 'serial', '', '', '', '', + 'pkg', 'varchar', '', $char_d, '', '', + 'comment', 'varchar', '', $char_d, '', '', + 'promo_code', 'varchar', 'NULL', $char_d, '', '', + 'setup', @perl_type, '', '', + 'freq', 'varchar', '', $char_d, '', '', #billing frequency + 'recur', @perl_type, '', '', + 'setuptax', 'char', 'NULL', 1, '', '', + 'recurtax', 'char', 'NULL', 1, '', '', + 'plan', 'varchar', 'NULL', $char_d, '', '', + 'plandata', 'text', 'NULL', '', '', '', + 'disabled', 'char', 'NULL', 1, '', '', + 'taxclass', 'varchar', 'NULL', $char_d, '', '', + 'classnum', 'int', 'NULL', '', '', '', + 'pay_weight', 'real', 'NULL', '', '', '', + 'credit_weight', 'real', 'NULL', '', '', '', ], 'primary_key' => 'pkgpart', 'unique' => [], @@ -809,8 +845,9 @@ sub tables_hashref { 'svc_acct' => { 'columns' => [ 'svcnum', 'int', '', '', '', '', - 'username', 'varchar', '', $username_len, '', '', #unique (& remove dup code) - '_password', 'varchar', '', 72, '', '', #13 for encryped pw's plus ' *SUSPENDED* (md5 passwords can be 34, blowfish 60) + 'username', 'varchar', '', $username_len, '', '', + '_password', 'varchar', '', 512, '', '', + '_password_encoding', 'varchar', 'NULL', $char_d, '', '', 'sec_phrase', 'varchar', 'NULL', $char_d, '', '', 'popnum', 'int', 'NULL', '', '', '', 'uid', 'int', 'NULL', '', '', '', @@ -821,6 +858,13 @@ sub tables_hashref { 'quota', 'varchar', 'NULL', $char_d, '', '', 'slipip', 'varchar', 'NULL', 15, '', '', #four TINYINTs, bah. 'seconds', 'int', 'NULL', '', '', '', #uhhhh + 'seconds_threshold', 'int', 'NULL', '', '', '', + 'upbytes', 'bigint', 'NULL', '', '', '', + 'upbytes_threshold', 'bigint', 'NULL', '', '', '', + 'downbytes', 'bigint', 'NULL', '', '', '', + 'downbytes_threshold', 'bigint', 'NULL', '', '', '', + 'totalbytes','bigint', 'NULL', '', '', '', + 'totalbytes_threshold', 'bigint', 'NULL', '', '', '', 'domsvc', 'int', '', '', '', '', ], 'primary_key' => 'svcnum', @@ -841,13 +885,20 @@ sub tables_hashref { 'svc_domain' => { 'columns' => [ - 'svcnum', 'int', '', '', '', '', - 'domain', 'varchar', '', $char_d, '', '', - 'catchall', 'int', 'NULL', '', '', '', + 'svcnum', 'int', '', '', '', '', + 'domain', 'varchar', '', $char_d, '', '', + 'suffix', 'varchar', 'NULL', $char_d, '', '', + 'catchall', 'int', 'NULL', '', '', '', + 'parent_svcnum', 'int', 'NULL', '', '', '', + 'registrarnum', 'int', 'NULL', '', '', '', + 'registrarkey', 'varchar', 'NULL', '', '', '', + 'setup_date', @date_type, '', '', + 'renewal_interval', 'int', 'NULL', '', '', '', + 'expiration_date', @date_type, '', '', ], 'primary_key' => 'svcnum', - 'unique' => [ ['domain'] ], - 'index' => [], + 'unique' => [ ], + 'index' => [ ['domain'] ], }, 'domain_record' => { @@ -864,6 +915,16 @@ sub tables_hashref { 'index' => [ ['svcnum'] ], }, + 'registrar' => { + 'columns' => [ + 'registrarnum', 'serial', '', '', '', '', + 'registrarname', 'varchar', '', $char_d, '', '', + ], + 'primary_key' => 'registrarnum', + 'unique' => [], + 'index' => [], + }, + 'svc_forward' => { 'columns' => [ 'svcnum', 'int', '', '', '', '', @@ -882,6 +943,7 @@ sub tables_hashref { 'svcnum', 'int', '', '', '', '', 'recnum', 'int', '', '', '', '', 'usersvc', 'int', '', '', '', '', + 'config', 'text', 'NULL', '', '', '', ], 'primary_key' => 'svcnum', 'unique' => [], @@ -907,6 +969,9 @@ sub tables_hashref { 'identifier', 'varchar', '', $char_d, '', '', 'amount', @money_type, '', '', 'seconds', 'int', 'NULL', '', '', '', + 'upbytes', 'bigint', 'NULL', '', '', '', + 'downbytes', 'bigint', 'NULL', '', '', '', + 'totalbytes', 'bigint', 'NULL', '', '', '', 'agentnum', 'int', 'NULL', '', '', '', ], 'primary_key' => 'prepaynum', @@ -1115,10 +1180,17 @@ sub tables_hashref { 'svc_broadband' => { 'columns' => [ 'svcnum', 'int', '', '', '', '', + 'description', 'varchar', 'NULL', $char_d, '', '', 'blocknum', 'int', '', '', '', '', 'speed_up', 'int', '', '', '', '', 'speed_down', 'int', '', '', '', '', 'ip_addr', 'varchar', '', 15, '', '', + 'mac_addr', 'varchar', 'NULL', 12, '', '', + 'authkey', 'varchar', 'NULL', 32, '', '', + 'latitude', 'decimal', 'NULL', '', '', '', + 'longitude', 'decimal', 'NULL', '', '', '', + 'altitude', 'decimal', 'NULL', '', '', '', + 'vlan_profile', 'varchar', 'NULL', $char_d, '', '', ], 'primary_key' => 'svcnum', 'unique' => [], @@ -1127,7 +1199,7 @@ sub tables_hashref { 'part_virtual_field' => { 'columns' => [ - 'vfieldpart', 'int', '', '', '', '', + 'vfieldpart', 'serial', '', '', '', '', 'dbtable', 'varchar', '', 32, '', '', 'name', 'varchar', '', 32, '', '', 'check_block', 'text', 'NULL', '', '', '', @@ -1351,25 +1423,15 @@ sub tables_hashref { 'index' => [], }, - 'cancel_reason' => { - 'columns' => [ - 'reasonnum', 'serial', '', '', '', '', - 'reason', 'varchar', '', $char_d, '', '', - 'disabled', 'char', 'NULL', 1, '', '', - ], - 'primary_key' => 'reasonnum', - 'unique' => [], - 'index' => [ [ 'disabled' ] ], - }, - 'pkg_class' => { 'columns' => [ 'classnum', 'serial', '', '', '', '', 'classname', 'varchar', '', $char_d, '', '', + 'disabled', 'char', 'NULL', 1, '', '', ], 'primary_key' => 'classnum', 'unique' => [], - 'index' => [], + 'index' => [ ['disabled'] ], }, 'cdr' => { @@ -1606,7 +1668,42 @@ sub tables_hashref { 'index' => [ [ 'countrycode', 'phonenum' ] ], }, - }; + 'reason_type' => { + 'columns' => [ + 'typenum', 'serial', '', '', '', '', + 'class', 'char', '', 1, '', '', + 'type', 'varchar', '', $char_d, '', '', + ], + 'primary_key' => 'typenum', + 'unique' => [], + 'index' => [], + }, + + 'reason' => { + 'columns' => [ + 'reasonnum', 'serial', '', '', '', '', + 'reason_type', 'int', '', '', '', '', + 'reason', 'varchar', '', $char_d, '', '', + 'disabled', 'char', 'NULL', 1, '', '', + ], + 'primary_key' => 'reasonnum', + 'unique' => [], + 'index' => [], + }, + + 'conf' => { + 'columns' => [ + 'confnum', 'serial', '', '', '', '', + 'agentnum', 'int', 'NULL', '', '', '', + 'name', 'varchar', '', $char_d, '', '', + 'value', 'varchar', 'NULL', '', '', '', # Pg specific + ], + 'primary_key' => 'confnum', + 'unique' => [ [ 'agentnum', 'name' ]], + 'index' => [], + }, + + # name type nullability length default local #'new_table' => { # 'columns' => [ @@ -1617,6 +1714,8 @@ sub tables_hashref { # 'index' => [], #}, + }; + } =back