Currently, we break down event location to 1. country and 2. the rest of the address. To prepare for enabling programmatic geolocation for events, we need to investigate how we can break up the address-related columns into separate table(s).
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T362881 [EPIC] Improvements to Event List | |||
Open | None | T362887 Add location filter of in person events to Event List | |||
Open | None | T316126 [EPIC] Attach programmatic geolocation to campaign events | |||
Resolved | Spike | cmelo | T316127 Investigate high-level database schema to store addresses |
Event Timeline
My proposal on this it to create two new tables:
1 - ce_address, this one for now will have just the columns to store the full address, and the country.
2 - ce_addresses, this one is to keep the relation between "campaign_events" and "ce_address" so one event can have one or more addresses.
Then, when we start working on geolocation stuff, we can add more columns to the ce_address table as needed.
After we move all the data of old events on beta to the new structure, we can drop the event_meeting_country and event_meeting_address from the campaign_events table
@vyuen , @Daimona and @MHorsey-WMF , I would love to have your feedback on this, thanks in advance. below is a link of the DB diagram.
https://dbdesigner.page.link/r5x5E6zP14iXMGN6A
This proposals looks good overall, just a few minor notes:
I would avoid calling the field "ce_address" (same as the table). Also, the field prefix would be "cea". So maybe the fields could be cea_id, cea_full_address, cea_country.
2 - ce_addresses, this one is to keep the relation between "campaign_events" and "ce_address" so one event can have one or more addresses.
For clarity, I'd call this ce_event_address. The field prefix would then be "ceea", and the fields could be ceea_event and ceea_address. I think we also need to follow the recommendation of adding an autoincrement primary key (even if the other two fields will be part of a unique index).
Closing this as the work is complete. However, please feel free to continue the discussion if necessary.