Table stoq_schema.public.work_order Generated by
SchemaSpy
Legend: SourceForge.net
Primary key columns
Columns with indexes
Implied relationships
Excluded column relationships
< n > number of related tables
 
Column Type Size Nulls Auto Default Children Parents Comments
id uuid 2147483647 uuid_generate_v1()
work_order_history.work_order_id work_order_history_work_order_id_fkey R
work_order_item.order_id work_order_item_order_id_fkey R
work_order_package_item.order_id work_order_package_item_order_id_fkey R
te_id int8 19  √  new_te()
transaction_entry.id work_order_te_id_fkey R
identifier serial 10  √  nextval('work_order_identifier_seq'::regclass)
status work_order_status 2147483647
description text 2147483647  √  null
estimated_hours numeric 10,2  √  null
estimated_cost numeric 20,2  √  null
estimated_start timestamp 29,6  √  null
estimated_finish timestamp 29,6  √  null
open_date timestamp 29,6  √  null
approve_date timestamp 29,6  √  null
finish_date timestamp 29,6  √  null
is_rejected bool 1 false
defect_reported text 2147483647  √  null
defect_detected text 2147483647  √  null
branch_id uuid 2147483647  √  null
branch.id work_order_branch_id_fkey R
sellable_id uuid 2147483647  √  null
sellable.id work_order_sellable_id_fkey R
quote_responsible_id uuid 2147483647  √  null
employee.id work_order_quote_responsible_id_fkey R
execution_responsible_id uuid 2147483647  √  null
employee.id work_order_execution_responsible_id_fkey R
category_id uuid 2147483647  √  null
work_order_category.id work_order_category_id_fkey R
client_id uuid 2147483647  √  null
client.id work_order_client_id_fkey R
sale_id uuid 2147483647  √  null
sale.id work_order_sale_id_fkey R
current_branch_id uuid 2147483647  √  null
branch.id work_order_current_branch_id_fkey R
execution_branch_id uuid 2147483647  √  null
branch.id work_order_execution_branch_id_fkey R
quantity int4 10  √  1
supplier_order text 2147483647  √  null

Analyzed at Fri Jun 10 16:06 BRT 2016

Indexes:
Column(s) Type Sort Constraint Name Anomalies
id Primary key Asc work_order_pkey  
identifier + branch_id Must be unique Asc/Asc work_order_identifier_branch_id_key  
te_id Must be unique Asc work_order_te_id_key This unique column is also nullable

Close relationships  within of separation: