X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FSchema.pm;h=bc9d37aed93ede982e41fba3aaeff0d90111d22c;hb=517ad7e0c5bd5a6329dfd3ef9c35f69afea9fc49;hp=ae9cb4174b3993afd44724f83a8a6ee52ef304fa;hpb=475fb78f0bbb9e2e37c04645eaf4b8bf8027ea08;p=freeside.git diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index ae9cb4174..bc9d37aed 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -3,7 +3,7 @@ package FS::Schema; use vars qw(@ISA @EXPORT_OK $DEBUG $setup_hack %dbdef_cache); use subs qw(reload_dbdef); use Exporter; -use DBIx::DBSchema 0.43; #0.43 for foreign keys +use DBIx::DBSchema 0.44; #for foreign keys with MATCH / ON DELETE/UPDATE use DBIx::DBSchema::Table; use DBIx::DBSchema::Column; use DBIx::DBSchema::Index; @@ -1138,9 +1138,10 @@ sub tables_hashref { { columns => [ 'invnum' ], table => 'cust_bill_void', }, - { columns => [ 'pkgnum' ], - table => 'cust_pkg', - }, + #pkgnum 0 and -1 are used for special things + #{ columns => [ 'pkgnum' ], + # table => 'cust_pkg', + #}, { columns => [ 'pkgpart_override' ], table => 'part_pkg', references => [ 'pkgpart' ], @@ -2389,7 +2390,7 @@ sub tables_hashref { 'index' => [ [ 'billpaynum' ], [ 'billpkgnum' ], ], 'foreign_keys' => [ { columns => [ 'billpaynum' ], - table => 'cust_bill_pay_batch', + table => 'cust_bill_pay', }, { columns => [ 'billpkgnum' ], table => 'cust_bill_pkg', @@ -3953,6 +3954,7 @@ sub tables_hashref { 'foreign_keys' => [ { columns => [ 'jobnum' ], table => 'queue', + on_delete => 'CASCADE', }, ], }, @@ -3973,6 +3975,7 @@ sub tables_hashref { { columns => [ 'depend_jobnum' ], table => 'queue', references => [ 'jobnum' ], + on_delete => 'CASCADE', }, ], }, @@ -5843,7 +5846,7 @@ sub tables_hashref { 'statustext', 'varchar', 'NULL', $char_d, '', '', ], 'primary_key' => 'upgradenum', - 'unique' => [ [ 'upgradenum' ] ], + 'unique' => [], 'index' => [ [ 'upgrade' ] ], },