Skip to main content

public.city

Description

Columns

NameTypeDefaultNullableChildrenParentsComment
city_idintegernextval('city_city_id_seq'::regclass)falsepublic.address
citytextfalse
country_idintegerfalsepublic.country
last_updatetimestamp with time zonenow()false

Constraints

NameTypeDefinition
city_pkeyPRIMARY KEYPRIMARY KEY (city_id)
city_country_id_fkeyFOREIGN KEYFOREIGN KEY (country_id) REFERENCES country(country_id) ON UPDATE CASCADE ON DELETE RESTRICT

Indexes

NameDefinition
city_pkeyCREATE UNIQUE INDEX city_pkey ON public.city USING btree (city_id)
idx_fk_country_idCREATE INDEX idx_fk_country_id ON public.city USING btree (country_id)

Triggers

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

Relations

er