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",
'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' ] ],
'cancel', @date_type, '', '',
'expire', @date_type, '', '',
'contract_end', @date_type, '', '',
+ 'dundate', @date_type, '', '',
'change_date', @date_type, '', '',
'change_pkgnum', 'int', 'NULL', '', '', '',
'change_pkgpart', 'int', 'NULL', '', '', '',
'credit_weight', 'real', 'NULL', '', '', '',
'agentnum', 'int', 'NULL', '', '', '',
'fcc_ds0s', 'int', 'NULL', '', '', '',
- 'no_auto', 'char', 'NULL', 1, '', '',
+ 'no_auto', 'char', 'NULL', 1, '', '',
+ 'recur_show_zero', 'char', 'NULL', 1, '', '',
],
'primary_key' => 'pkgpart',
'unique' => [],
'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' => [
'countrycode', 'varchar', '', 3, '', '',
'npa', 'varchar', 'NULL', 10, '', '', #actually the whole prefix
'nxx', 'varchar', 'NULL', 3, '', '', #actually not used
+ 'latanum', 'int', 'NULL', '', '', '',
+ 'state', 'char', 'NULL', 2, '', '',
+ 'ocn', 'char', 'NULL', 4, '', '',
],
'primary_key' => 'prefixnum',
'unique' => [],
'classname', 'varchar', '', $char_d, '', '',
'categorynum', 'int', 'NULL', '', '', '',
'disabled', 'char', 'NULL', 1, '', '',
+ 'fcc_ds0s', 'int', 'NULL', '', '', '',
],
'primary_key' => 'classnum',
'unique' => [],
[ 'exportnum', 'countrycode', 'npa', 'nxx', 'station' ], # #
[ 'svcnum' ],
[ 'availbatch' ],
+ [ 'latanum' ],
],
},
'columns' => [
'latanum', 'int', '', '', '', '',
'description', 'varchar', '', $char_d, '', '',
+ 'have_usage', 'int', 'NULL', '', '', '',
],
'primary_key' => 'latanum',
'unique' => [],
'ratecenternum', 'int', 'NULL', '', '', '',
'state', 'char', 'NULL', 2, '', '',
'quantity', 'int', '', '', '', '',
+ 'custnum', 'int', 'NULL', '', '', '',
],
'primary_key' => 'orderitemnum',
'unique' => [],