Table stoq_schema.public.sellable 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()
client_category_price.sellable_id client_category_price_sellable_id_fkey R
commission_source.sellable_id commission_source_sellable_id_fkey R
loan_item.sellable_id loan_item_sellable_id_fkey R
product.id product_id_fkey R
product_history.sellable_id product_history_sellable_id_fkey R
purchase_item.sellable_id purchase_item_sellable_id_fkey R
receiving_order_item.sellable_id receiving_order_item_sellable_id_fkey R
returned_sale_item.sellable_id returned_sale_item_sellable_id_fkey R
sale_item.sellable_id sale_item_sellable_id_fkey R
service.id service_id_fkey R
stock_decrease_item.sellable_id stock_decrease_item_sellable_id_fkey R
transfer_order_item.sellable_id transfer_order_item_sellable_id_fkey R
work_order.sellable_id work_order_sellable_id_fkey R
work_order_item.sellable_id work_order_item_sellable_id_fkey R
te_id int8 19  √  new_te()
transaction_entry.id sellable_te_id_fkey R
barcode text 2147483647  √  null
code text 2147483647  √  null
status sellable_status 2147483647
description text 2147483647  √  null
cost numeric 20,8  √  null
base_price numeric 20,2  √  null
notes text 2147483647  √  null
max_discount numeric 10,2  √  null
commission numeric 10,2  √  null
on_sale_price numeric 20,2  √  null
on_sale_start_date timestamp 29,6  √  null
on_sale_end_date timestamp 29,6  √  null
image_id uuid 2147483647  √  null
image.id sellable_image_id_fkey R
unit_id uuid 2147483647  √  null
sellable_unit.id sellable_unit_id_fkey R
category_id uuid 2147483647  √  null
sellable_category.id sellable_category_id_fkey R
tax_constant_id uuid 2147483647  √  null
sellable_tax_constant.id sellable_tax_constant_id_fkey R
default_sale_cfop_id uuid 2147483647  √  null
cfop_data.id sellable_default_sale_cfop_id_fkey R

Analyzed at Fri Jun 10 16:06 BRT 2016

Indexes:
Column(s) Type Sort Constraint Name Anomalies
id Primary key Asc sellable_pkey  
description Performance Asc sellable_description_idx  
Performance sellable_description_normalized_idx  
image_id Must be unique Asc sellable_image_id_key This unique column is also nullable
te_id Must be unique Asc sellable_te_id_key This unique column is also nullable

Close relationships  within of separation: