Skip to main content

public.customer

Description

Columns

NameTypeDefaultNullableChildrenParentsComment
customer_idintegernextval('customer_customer_id_seq'::regclass)falsepublic.payment_p2022_01 public.payment_p2022_02 public.payment_p2022_03 public.payment_p2022_04 public.payment_p2022_05 public.payment_p2022_06 public.rental
store_idintegerfalsepublic.store
first_nametextfalse
last_nametextfalse
emailtexttrue
address_idintegerfalsepublic.address
activeboolbooleantruefalse
create_datedateCURRENT_DATEfalse
last_updatetimestamp with time zonenow()true
activeintegertrue

Constraints

NameTypeDefinition
customer_address_id_fkeyFOREIGN KEYFOREIGN KEY (address_id) REFERENCES address(address_id) ON UPDATE CASCADE ON DELETE RESTRICT
customer_pkeyPRIMARY KEYPRIMARY KEY (customer_id)
customer_store_id_fkeyFOREIGN KEYFOREIGN KEY (store_id) REFERENCES store(store_id) ON UPDATE CASCADE ON DELETE RESTRICT

Indexes

NameDefinition
customer_pkeyCREATE UNIQUE INDEX customer_pkey ON public.customer USING btree (customer_id)
idx_fk_address_idCREATE INDEX idx_fk_address_id ON public.customer USING btree (address_id)
idx_fk_store_idCREATE INDEX idx_fk_store_id ON public.customer USING btree (store_id)
idx_last_nameCREATE INDEX idx_last_name ON public.customer USING btree (last_name)

Triggers

NameDefinition
last_updatedCREATE TRIGGER last_updated BEFORE UPDATE ON public.customer FOR EACH ROW EXECUTE FUNCTION last_updated()

Relations

er