Extend deviceid in db