resonatecoop / api

The one Resonate API to rule them all

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Import labels

simonv3 opened this issue · comments

commented

Is there anything in place to actually track user group membership of itself? For example, artists being part of labels? As part of this, it kind of looks like a lot of the migrations into the DB that are labeled as "Label" are actually artists.

Edit: made the decision to do the following:

  1. Create a user_group_members table.
  2. on import from user-api db, import all user_groups as artists.
  3. fetch all labels from rsntr_usermeta meta_key = 'mylabel'. This gives values user_id (member) of meta_value (label).
  4. Find the label by user_group.legacy_id. Change that label to be of type label (3).
  5. Find the artist by user_group.legacy_id. Insert them into the user_group_members table.