Migrate db.displays to index by uid
emptyrivers opened this issue · 2 comments
Is your feature request related to a problem? Please describe.
With internalVersion 10, all auras are guaranteed to have a uid. A uid for an aura will never change, ever. So, we could index the database via the uid, and potentially rid ourselves of huge swaths of code related to Renaming.
Describe the solution you'd like
On ADDON_LOADED, check if the user’s db has the data
field. If not, then create a table and populate it with aura data, indexed by uid. Then, optionally delete the displays field, or reduce it to just an id<=>uid map or some such.
Describe alternatives you've considered
We could also simply do nothing.
Additional context
This will require all sorts of research to make work, without losing readability. It will also potentially break custom code if we are not careful, so some care in deciding exactly what to do is needed.
This could also potentially allow duplicate names. Whether or not that is a good idea is something I do not know.