X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/2ea07c13e111b88478827bf621d41df3eec19dac..46f9d91b44c432aa017f44b6b2f53114e190428e:/SL/DB/MetaSetup/Price.pm diff --git a/SL/DB/MetaSetup/Price.pm b/SL/DB/MetaSetup/Price.pm index 29c0de338..a0c26391f 100644 --- a/SL/DB/MetaSetup/Price.pm +++ b/SL/DB/MetaSetup/Price.pm @@ -10,13 +10,15 @@ __PACKAGE__->meta->table('prices'); __PACKAGE__->meta->columns( id => { type => 'serial', not_null => 1 }, - parts_id => { type => 'integer' }, + parts_id => { type => 'integer', not_null => 1 }, price => { type => 'numeric', precision => 15, scale => 5 }, - pricegroup_id => { type => 'integer' }, + pricegroup_id => { type => 'integer', not_null => 1 }, ); __PACKAGE__->meta->primary_key_columns([ 'id' ]); +__PACKAGE__->meta->unique_keys([ 'parts_id', 'pricegroup_id' ]); + __PACKAGE__->meta->foreign_keys( parts => { class => 'SL::DB::Part',