initially i was going to store the primary device ID in the metadata table, but i realized soon after that this wasn't necessary. nonetheless, i thought this change could be useful if we decide to add more rows to the metadata table in the future.
Depends on D12161