X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FSchema.pm;h=548c22e777bb114e99a9ed579bb462991e74c177;hp=9dc5dc6f81ccd42228c171b2204bdd287898ee1d;hb=077bb34b3467c3320440c49b76064f664c0eee98;hpb=dbe1f22d63052dbbfe8b3cb578a0d831213ebb75 diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index 9dc5dc6f8..548c22e77 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -197,34 +197,42 @@ sub dbdef_dist { my $tableobj = $dbdef->table($table) or die "unknown table $table"; - my %indices = $tableobj->indices; + my %h_indices = (); + + unless ( $table eq 'cust_event' ) { #others? + + my %indices = $tableobj->indices; - my %h_indices = map { - ( "h_$_" => - DBIx::DBSchema::Index->new({ - 'name' => 'h_'. $indices{$_}->name, - 'unique' => 0, - 'columns' => [ @{$indices{$_}->columns} ], - }) - ); - } - keys %indices; - - $h_indices{"h_${table}_srckey"} = DBIx::DBSchema::Index->new({ - 'name' => "h_${table}_srckey", - 'unique' => 0, - 'columns' => [ 'history_action', #right? - $tableobj->primary_key, - ], - }); - - $h_indices{"h_${table}_srckey2"} = DBIx::DBSchema::Index->new({ - 'name' => "h_${table}_srckey2", - 'unique' => 0, - 'columns' => [ 'history_date', - $tableobj->primary_key, - ], - }); + %h_indices = map { + ( "h_$_" => + DBIx::DBSchema::Index->new({ + 'name' => 'h_'. $indices{$_}->name, + 'unique' => 0, + 'columns' => [ @{$indices{$_}->columns} ], + }) + ); + } + keys %indices; + + $h_indices{"h_${table}_srckey"} = + DBIx::DBSchema::Index->new({ + 'name' => "h_${table}_srckey", + 'unique' => 0, + 'columns' => [ 'history_action', #right? + $tableobj->primary_key, + ], + }); + + $h_indices{"h_${table}_srckey2"} = + DBIx::DBSchema::Index->new({ + 'name' => "h_${table}_srckey2", + 'unique' => 0, + 'columns' => [ 'history_date', + $tableobj->primary_key, + ], + }); + + } my $h_tableobj = DBIx::DBSchema::Table->new( { 'name' => "h_$table", @@ -873,6 +881,7 @@ sub tables_hashref { 'email_csv_cdr', 'char', 'NULL', 1, '', '', 'accountcode_cdr', 'char', 'NULL', 1, '', '', 'billday', 'int', 'NULL', '', '', '', + 'edit_subject', 'char', 'NULL', 1, '', '', ], 'primary_key' => 'custnum', 'unique' => [ [ 'agentnum', 'agent_custid' ] ], @@ -1446,6 +1455,8 @@ sub tables_hashref { 'quantity', 'int', 'NULL', '', '', '', 'agent_pkgid', 'int', 'NULL', '', '', '', 'waive_setup', 'char', 'NULL', 1, '', '', + 'recur_show_zero', 'char', 'NULL', 1, '', '', + 'setup_show_zero', 'char', 'NULL', 1, '', '', ], 'primary_key' => 'pkgnum', 'unique' => [], @@ -1629,6 +1640,7 @@ sub tables_hashref { 'fcc_ds0s', 'int', 'NULL', '', '', '', 'no_auto', 'char', 'NULL', 1, '', '', 'recur_show_zero', 'char', 'NULL', 1, '', '', + 'setup_show_zero', 'char', 'NULL', 1, '', '', ], 'primary_key' => 'pkgpart', 'unique' => [], @@ -2329,12 +2341,24 @@ sub tables_hashref { 'columns' => [ 'usergroupnum', 'serial', '', '', '', '', 'svcnum', 'int', '', '', '', '', - 'groupname', 'varchar', '', $char_d, '', '', + 'groupname', 'varchar', 'NULL', $char_d, '', '', + 'groupnum', 'int', 'NULL', '', '', '', ], 'primary_key' => 'usergroupnum', 'unique' => [], 'index' => [ [ 'svcnum' ], [ 'groupname' ] ], }, + + 'radius_group' => { + 'columns' => [ + 'groupnum', 'serial', '', '', '', '', + 'groupname', 'varchar', '', $char_d, '', '', + 'description', 'varchar', 'NULL', $char_d, '', '', + ], + 'primary_key' => 'groupnum', + 'unique' => [ ['groupname'] ], + 'index' => [], + }, 'msgcat' => { 'columns' => [ @@ -2446,9 +2470,7 @@ sub tables_hashref { 'vfieldpart', 'serial', '', '', '', '', 'dbtable', 'varchar', '', 32, '', '', 'name', 'varchar', '', 32, '', '', - 'check_block', 'text', 'NULL', '', '', '', 'length', 'int', 'NULL', '', '', '', - 'list_source', 'text', 'NULL', '', '', '', 'label', 'varchar', 'NULL', 80, '', '', ], 'primary_key' => 'vfieldpart', @@ -2760,6 +2782,7 @@ sub tables_hashref { 'classname', 'varchar', '', $char_d, '', '', 'categorynum', 'int', 'NULL', '', '', '', 'disabled', 'char', 'NULL', 1, '', '', + 'fcc_ds0s', 'int', 'NULL', '', '', '', ], 'primary_key' => 'classnum', 'unique' => [], @@ -3136,6 +3159,7 @@ sub tables_hashref { [ 'exportnum', 'countrycode', 'npa', 'nxx', 'station' ], # # [ 'svcnum' ], [ 'availbatch' ], + [ 'latanum' ], ], }, @@ -3143,6 +3167,7 @@ sub tables_hashref { 'columns' => [ 'latanum', 'int', '', '', '', '', 'description', 'varchar', '', $char_d, '', '', + 'have_usage', 'int', 'NULL', '', '', '', ], 'primary_key' => 'latanum', 'unique' => [],