Table stoq_schema.public.sale_item 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()
delivery.service_item_id delivery_service_item_id_fkey R
returned_sale_item.sale_item_id returned_sale_item_sale_item_id_fkey R
sale_item.parent_item_id sale_item_parent_item_id_fkey R
work_order_item.sale_item_id work_order_item_sale_item_id_fkey R
te_id int8 19  √  new_te()
transaction_entry.id sale_item_te_id_fkey R
quantity numeric 20,3  √  null
quantity_decreased numeric 20,3  √  0
base_price numeric 20,2  √  null
price numeric 20,2  √  null
notes text 2147483647  √  null
estimated_fix_date timestamp 29,6  √  null
completion_date timestamp 29,6  √  null
average_cost numeric 20,8  √  0
sale_id uuid 2147483647  √  null
sale.id sale_item_sale_id_fkey R
sellable_id uuid 2147483647  √  null
sellable.id sale_item_sellable_id_fkey R
batch_id uuid 2147483647  √  null
storable_batch.id sale_item_batch_id_fkey R
icms_info_id uuid 2147483647  √  null
invoice_item_icms.id sale_item_icms_info_id_fkey R
ipi_info_id uuid 2147483647  √  null
invoice_item_ipi.id sale_item_ipi_info_id_fkey R
cfop_id uuid 2147483647  √  null
cfop_data.id sale_item_cfop_id_fkey R
delivery_id uuid 2147483647  √  null
delivery.id sale_item_delivery_id_fkey R
pis_info_id uuid 2147483647  √  null
invoice_item_pis.id sale_item_pis_info_id_fkey R
cofins_info_id uuid 2147483647  √  null
invoice_item_cofins.id sale_item_cofins_info_id_fkey R
parent_item_id uuid 2147483647  √  null
sale_item.id sale_item_parent_item_id_fkey R

Analyzed at Fri Jun 10 16:06 BRT 2016

Indexes:
Column(s) Type Sort Constraint Name Anomalies
id Primary key Asc sale_item_pkey  
te_id Must be unique Asc sale_item_te_id_key This unique column is also nullable

Close relationships  within of separation: