Rename column to uuid instead of uid. Modify controller to accept device uuid and find the id based on that.