Table stoq_schema.public.returned_sale 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()
returned_sale_item.returned_sale_id returned_sale_item_returned_sale_id_fkey R
te_id int8 19  √  new_te()
transaction_entry.id returned_sale_te_id_fkey R
identifier serial 10  √  nextval('returned_sale_identifier_seq'::regclass)
return_date timestamp 29,6  √  null
reason text 2147483647  √  null
invoice_number int4 10  √  null
responsible_id uuid 2147483647  √  null
login_user.id returned_sale_responsible_id_fkey R
branch_id uuid 2147483647
branch.id returned_sale_branch_id_fkey R
sale_id uuid 2147483647  √  null
sale.id returned_sale_sale_id_fkey R
new_sale_id uuid 2147483647  √  null
sale.id returned_sale_new_sale_id_fkey R
status returned_sale_status 2147483647  √  null
confirm_responsible_id uuid 2147483647  √  null
login_user.id returned_sale_confirm_responsible_id_fkey R
confirm_date timestamp 29,6  √  null
undo_date timestamp 29,6  √  null
undo_responsible_id uuid 2147483647  √  null
login_user.id returned_sale_undo_responsible_id_fkey R
undo_reason text 2147483647  √  null
invoice_id uuid 2147483647  √  null
invoice.id returned_sale_invoice_id_fkey R

Analyzed at Fri Jun 10 16:06 BRT 2016

Indexes:
Column(s) Type Sort Constraint Name Anomalies
id Primary key Asc returned_sale_pkey  
identifier + branch_id Must be unique Asc/Asc returned_sale_identifier_branch_id_key  
invoice_number + branch_id Must be unique Asc/Asc returned_sale_invoice_number_branch_id_key  
new_sale_id Must be unique Asc returned_sale_new_sale_id_key This unique column is also nullable
te_id Must be unique Asc returned_sale_te_id_key This unique column is also nullable

Close relationships  within of separation: