Skip to main content

public.inventory

Description

Columns

NameTypeDefaultNullableChildrenParentsComment
inventory_idintegernextval('inventory_inventory_id_seq'::regclass)falsepublic.rental
film_idintegerfalsepublic.film
store_idintegerfalsepublic.store
last_updatetimestamp with time zonenow()false

Constraints

NameTypeDefinition
inventory_film_id_fkeyFOREIGN KEYFOREIGN KEY (film_id) REFERENCES film(film_id) ON UPDATE CASCADE ON DELETE RESTRICT
inventory_pkeyPRIMARY KEYPRIMARY KEY (inventory_id)
inventory_store_id_fkeyFOREIGN KEYFOREIGN KEY (store_id) REFERENCES store(store_id) ON UPDATE CASCADE ON DELETE RESTRICT

Indexes

NameDefinition
inventory_pkeyCREATE UNIQUE INDEX inventory_pkey ON public.inventory USING btree (inventory_id)
idx_store_id_film_idCREATE INDEX idx_store_id_film_id ON public.inventory USING btree (store_id, film_id)

Triggers

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

Relations

er