wersja 3 db scheme
This commit is contained in:
@@ -30,7 +30,7 @@ Enum part_type {
|
||||
Table parts {
|
||||
id int [pk]
|
||||
product_id int [ref: > products.id, not null]
|
||||
type part_type_type [not null]
|
||||
type part_type [not null]
|
||||
color_top int [ref: > colors.id, not null]
|
||||
color_back int [ref: > colors.id, not null]
|
||||
finish_top finish_type [not null]
|
||||
@@ -112,6 +112,11 @@ Table events {
|
||||
indexes {
|
||||
(part_id, ordinal) [unique]
|
||||
}
|
||||
|
||||
checks {
|
||||
`type != 'OPERATION' OR operation_id IS NOT NULL` [name: 'chk_event_operation_required']
|
||||
`type = 'OPERATION' OR operation_id IS NULL` [name: 'chk_event_operation_forbidden']
|
||||
}
|
||||
}
|
||||
|
||||
Table production_lists {
|
||||
|
||||
Reference in New Issue
Block a user