updates db on drag and drop