* finished log margin data to db