#!/usr/bin/perl -Tw
#
-# $Id: fs-setup,v 1.85 2002-04-05 23:51:17 ivan Exp $
+# $Id: fs-setup,v 1.89 2002-04-20 06:33:03 ivan Exp $
#to delay loading dbdef until we're ready
BEGIN { $FS::Record::setup_hack = 1; }
#create history tables (false laziness w/create-history-tables)
foreach my $table ( grep { ! /^h_/ } $dbdef->tables ) {
- my $tableobj = $dbdef->table($table);
+ my $tableobj = $dbdef->table($table)
+ or die "unknown table $table";
+
my $h_tableobj = DBIx::DBSchema::Table->new( {
name => "h_$table",
primary_key => 'historynum',
'statustext', 'text', 'NULL', '',
],
'primary_key' => 'eventnum',
- 'unique' => [ [ 'eventpart', 'invnum' ] ],
+ #no... there are retries now #'unique' => [ [ 'eventpart', 'invnum' ] ],
+ 'unique' => [],
'index' => [ ['invnum'], ['status'] ],
},
'npa', 'char', '', 3,
'nxx', 'char', '', 3,
],
- 'primary_key' => 'popnum',
+ 'primary_key' => 'localnum',
'unique' => [ [] ],
- 'index' => [ [ 'npa', 'nxx' ] ],
+ 'index' => [ [ 'npa', 'nxx' ], [ 'popnum' ] ],
},
'svc_acct' => {
'index' => [ [ 'jobnum' ] ],
},
+ 'export_svc' => {
+ 'columns' => [
+ 'exportsvcnum' => 'int', '', '',
+ 'exportnum' => 'int', '', '',
+ 'svcpart' => 'int', '', '',
+ ],
+ 'primary_key' => 'exportsvcnum',
+ 'unique' => [ [ 'exportnum', 'svcpart' ] ],
+ 'index' => [ [ 'exportnum' ], [ 'svcpart' ] ],
+ },
+
'part_export' => {
'columns' => [
'exportnum', 'int', '', '',
- 'svcpart', 'int', '', '',
+ #'svcpart', 'int', '', '',
'machine', 'varchar', '', $char_d,
'exporttype', 'varchar', '', $char_d,
'nodomain', 'char', 'NULL', 1,