Don't fail with duplicate key errors if there is more than one row already in the devices table, since it attempts to update the device_id column.