Table stoq_schema.public.stock_transaction_history Generated by
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()
cost_center_entry.stock_transaction_id cost_center_entry_stock_transaction_id_fkey R
te_id int8 19  √  new_te() stock_transaction_history_te_id_fkey R
date timestamp 29,6  √  null
stock_cost numeric 20,8  √  null
quantity numeric 20,3  √  null
type stock_transaction_history_type 2147483647
object_id uuid 2147483647  √  null
responsible_id uuid 2147483647 stock_transaction_history_responsible_id_fkey R
storable_id uuid 2147483647 stock_transaction_history_storable_id_fkey R
batch_id uuid 2147483647  √  null stock_transaction_history_batch_id_fkey R
branch_id uuid 2147483647 stock_transaction_history_branch_id_fkey R
unit_cost numeric 20,8  √  null

Analyzed at Fri Jun 10 16:06 BRT 2016

Column(s) Type Sort Constraint Name Anomalies
id Primary key Asc stock_transaction_history_pkey  
branch_id + storable_id + batch_id Performance Asc/Asc/Asc stock_transaction_history_branch_storable_batch_idx  
te_id Must be unique Asc stock_transaction_history_te_id_key This unique column is also nullable

Close relationships  within of separation: