X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FSchema.pm;h=49e8bd7e2439f27f00da72b12746c4db0e5e5663;hp=321fb3f07bd360885d1263767d8a7fe651967aba;hb=13f21e01ac9faa50c07f64c20cbceae0ae50790c;hpb=beff2bed3d06a91072427a15efef08b24c7cc8df diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index 321fb3f07..49e8bd7e2 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -466,7 +466,7 @@ sub tables_hashref { my $char_d = 80; #default maxlength for text fields #my(@date_type) = ( 'timestamp', '', '' ); - my @date_type = ( 'int', 'NULL', '' ); + my @date_type = ( 'int', 'NULL', '' ); my @perl_type = ( 'text', 'NULL', '' ); my @money_type = ( 'decimal', '', '10,2' ); my @money_typen = ( 'decimal', 'NULL', '10,2' ); @@ -1521,8 +1521,10 @@ sub tables_hashref { 'stateid_state', 'varchar', 'NULL', $char_d, '', '', 'national_id', 'varchar', 'NULL', $char_d, '', '', 'birthdate' ,@date_type, '', '', - 'spouse_birthdate' ,@date_type, '', '', - 'anniversary_date' ,@date_type, '', '', + 'spouse_last', 'varchar', 'NULL', 2*$char_d, '', '', + 'spouse_first', 'varchar', 'NULL', $char_d, '', '', + 'spouse_birthdate', @date_type, '', '', + 'anniversary_date', @date_type, '', '', 'signupdate',@date_type, '', '', 'dundate', @date_type, '', '', 'company', 'varchar', 'NULL', $char_d, '', '', @@ -2230,7 +2232,7 @@ sub tables_hashref { 'pkgnum', 'int', 'NULL', '', '', '', #desired pkgnum for pkg-balances 'status', 'varchar', '', $char_d, '', '', - 'session_id', 'varchar', 'NULL', $char_d, '', '', #only need 32 + 'session_id', 'varchar', 'NULL', 1024, '', '', # SHA-512-hex 'statustext', 'text', 'NULL', '', '', '', 'gatewaynum', 'int', 'NULL', '', '', '', #'cust_balance', @money_type, '', '', @@ -2571,7 +2573,7 @@ sub tables_hashref { 'manual_flag', 'char', 'NULL', 1, '', '', 'no_auto', 'char', 'NULL', 1, '', '', 'quantity', 'int', 'NULL', '', '', '', - 'agent_pkgid', 'int', 'NULL', '', '', '', + 'agent_pkgid', 'varchar', 'NULL', $char_d, '', '', 'waive_setup', 'char', 'NULL', 1, '', '', 'recur_show_zero', 'char', 'NULL', 1, '', '', 'setup_show_zero', 'char', 'NULL', 1, '', '', @@ -2853,7 +2855,8 @@ sub tables_hashref { 'currency', 'char', 'NULL', 3, '', '', 'otaker', 'varchar', 'NULL', 32, '', '', 'usernum', 'int', 'NULL', '', '', '', - 'reason', 'varchar', '', $char_d, '', '', + 'reason', 'varchar', 'NULL', $char_d, '', '', + 'reasonnum', 'int', 'NULL', '', '', '', 'payby', 'char', '', 4, '', '', # CARD/BILL/COMP, should # be index into payby # table eventually @@ -2877,6 +2880,9 @@ sub tables_hashref { { columns => [ 'usernum' ], table => 'access_user', }, + { columns => [ 'reasonnum' ], + table => 'reason', + }, { columns => [ 'gatewaynum' ], table => 'payment_gateway', }, @@ -4449,9 +4455,9 @@ sub tables_hashref { 'unique' => [ [ 'blocknum', 'routernum' ] ], 'index' => [], 'foreign_keys' => [ - { columns => [ 'routernum' ], - table => 'router', - }, + #{ columns => [ 'routernum' ], + # table => 'router', + #}, { columns => [ 'agentnum' ], table => 'agent', }, @@ -5043,11 +5049,12 @@ sub tables_hashref { 'pkg_category' => { 'columns' => [ - 'categorynum', 'serial', '', '', '', '', - 'categoryname', 'varchar', '', $char_d, '', '', - 'weight', 'int', 'NULL', '', '', '', - 'condense', 'char', 'NULL', 1, '', '', - 'disabled', 'char', 'NULL', 1, '', '', + 'categorynum', 'serial', '', '', '', '', + 'categoryname', 'varchar', '', $char_d, '', '', + 'weight', 'int', 'NULL', '', '', '', + 'ticketing_queueid', 'int', 'NULL', '', '', '', + 'condense', 'char', 'NULL', 1, '', '', + 'disabled', 'char', 'NULL', 1, '', '', ], 'primary_key' => 'categorynum', 'unique' => [], @@ -5473,6 +5480,44 @@ sub tables_hashref { 'index' => [], }, + 'sched_item' => { + 'columns' => [ + 'itemnum', 'serial', '', '', '', '', + 'usernum', 'int', 'NULL', '', '', '', + #'itemname', 'varchar', $char_d, '', '', '', + 'disabled', 'char', 'NULL', 1, '', '', + ], + 'primary_key' => 'itemnum', + 'unique' => [ [ 'usernum' ] ], + 'index' => [], + 'foreign_keys' => [ + { columns => [ 'usernum' ], + table => 'access_user', + }, + ], + }, + + #'sched_item_class' + + 'sched_avail' => { + 'columns' => [ + 'availnum', 'serial', '', '', '', '', + 'itemnum', 'int', '', '', '', '', + 'wday', 'int', '', '', '', '', + 'stime', 'int', '', '', '', '', + 'etime', 'int', '', '', '', '', + 'override_date', @date_type, '', '', + ], + 'primary_key' => 'availnum', + 'unique' => [], + 'index' => [], + 'foreign_keys' => [ + { columns => [ 'itemnum' ], + table => 'sched_item', + }, + ], + }, + 'svc_phone' => { 'columns' => [ 'svcnum', 'int', '', '', '', '', @@ -6013,7 +6058,7 @@ sub tables_hashref { 'cust_msg' => { 'columns' => [ 'custmsgnum', 'serial', '', '', '', '', - 'custnum', 'int', '', '', '', '', + 'custnum', 'int', 'NULL', '', '', '', 'msgnum', 'int', 'NULL', '', '', '', '_date', @date_type, '', '', 'env_from', 'varchar', 'NULL', 255, '', '', @@ -6022,6 +6067,7 @@ sub tables_hashref { 'body', 'blob', 'NULL', '', '', '', 'error', 'varchar', 'NULL', 255, '', '', 'status', 'varchar', '',$char_d, '', '', + 'msgtype', 'varchar', 'NULL', 16, '', '', ], 'primary_key' => 'custmsgnum', 'unique' => [ ],