Database tables

All tables use the network base prefix and live on the main site. They are created by LH_Addresses_Table::maybe_upgrade(), keyed on schema_version() (currently 0.1.0) stored in the network option lh_addresses-schema_version.

{base_prefix}lh_addresses

{base_prefix}lh_address_uses

address_id, blog_id (0 for the member’s own book), type, created. Primary key (address_id, blog_id, type); index on (blog_id, type).

{base_prefix}lh_address_geo

address_id, geo_point (POINT, NOT NULL, spatial index), latitude, longitude. A row exists only once an address is geocoded; it is a side table because a spatial index needs a NOT NULL column.

History

Rows are updated in place; there are no valid-from or valid-to columns. Changes are meant to be recorded by LH Audit Trail, from the hooks this plugin fires.