#!/usr/bin/perl -Tw
#
-# $Id: fs-setup,v 1.48 2001-09-02 02:46:55 ivan Exp $
+# $Id: fs-setup,v 1.51 2001-09-04 11:14:13 ivan Exp $
#to delay loading dbdef until we're ready
BEGIN { $FS::Record::setup_hack = 1; }
#turn it into objects
my($dbdef) = new DBIx::DBSchema ( map {
my(@columns);
+ warn $_;
+ warn $tables{$_}{'columns'};
while (@{$tables{$_}{'columns'}}) {
my($name,$type,$null,$length)=splice @{$tables{$_}{'columns'}}, 0, 4;
push @columns, new DBIx::DBSchema::Column ( $name,$type,$null,$length );
},
'cust_bill_pay' => {
- 'column' => [
+ 'columns' => [
'billpaynum', 'int', '', '',
'invnum', 'int', '', '',
'paynum', 'int', '', '',
'amount', @money_type,
'_date', @date_type
],
- 'primary_key' => 'billpaynum'
+ 'primary_key' => 'billpaynum',
'unique' => [ [] ],
'index' => [ [ 'paynum', 'invnum' ] ],
},
],
'primary_key' => 'refundnum',
'unique' => [ [] ],
- 'index' => [ ['crednum'] ],
+ 'index' => [ [] ],
},
'cust_credit_refund' => {
- 'column' => [
+ 'columns' => [
'creditrefundnum', 'int', '', '',
'crednum', 'int', '', '',
'refundnum', 'int', '', '',
'amount', @money_type,
'_date', @date_type
],
- 'primary_key' => 'creditrefundnum'
+ 'primary_key' => 'creditrefundnum',
'unique' => [ [] ],
'index' => [ [ 'crednum', 'refundnum' ] ],
},