mstenta / farm_sync

Drupal 8 module with features for synchronizing records from farmOS into the local database.
1 stars 0 forks source link

Sync area hierarchy information #6

Open mstenta opened 5 years ago

mstenta commented 5 years ago

Currently areas are synced as a flat list, without information about what the area hierarchy is.

This task is to add a new "parent_id" column to {farm_sync_areas} that contains the ID of the area's parent, if it exists.

Need to figure out: should we support multiple parents? Drupal/farmOS technically do, although in most cases areas will only have one parent. This would require a second database table if we needed a many-to-one relationship like this. Perhaps we should just take a simple first step and only include the first parent?