Open JCKalt opened 1 year ago
Let's research the DELETE functionality and examine the code that will properly result in an error for a collision. First implementation should be a failure and rollback of entire block with an error describing which key caused the problem. Should try to see if key vialoation can be caught so that check doesn't need to be made first, which should help for performance.
getser.py creates a set of csv files and json files. The json files can be imported using API put requests, however need to clarify how duplicates are treated. Currently a put to a serial-number doesn't need to confirm that the serial-number is not used for another device. However with the new data model change, we are dropping device type from the primary key of serial-number.
What should happen when a PUT happens for a serial-number that is already used for a different device-type. This should result in an error. However need to make sure that a DELETE followed by a PUT does enable making such updates.