Revision d817962e
Von Kivitendo Admin vor etwa 8 Jahren hinzugefügt
SL/DB/MetaSetup/Price.pm | ||
---|---|---|
10 | 10 |
|
11 | 11 |
__PACKAGE__->meta->columns( |
12 | 12 |
id => { type => 'serial', not_null => 1 }, |
13 |
parts_id => { type => 'integer' }, |
|
13 |
parts_id => { type => 'integer', not_null => 1 },
|
|
14 | 14 |
price => { type => 'numeric', precision => 15, scale => 5 }, |
15 |
pricegroup_id => { type => 'integer' }, |
|
15 |
pricegroup_id => { type => 'integer', not_null => 1 },
|
|
16 | 16 |
); |
17 | 17 |
|
18 | 18 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
19 | 19 |
|
20 |
__PACKAGE__->meta->unique_keys([ 'parts_id', 'pricegroup_id' ]); |
|
21 |
|
|
20 | 22 |
__PACKAGE__->meta->foreign_keys( |
21 | 23 |
parts => { |
22 | 24 |
class => 'SL::DB::Part', |
Auch abrufbar als: Unified diff
Tabelle prices - not null und unique auf parts_id und partsgroup_id