Merge two coffees
merge_beansDestructive
Fold one coffee into another when the same coffee was registered twice. Every bag, shot, recipe and recommendation of from_bean_id moves to into_bean_id; the active coffee follows if it was the one merged away; origins move only if the target has none. Where both hold a locked recipe for the same grinder, machine, program and drink, the newer lock wins and the older is deleted. The source coffee is archived, never deleted. Irreversible: confirm both numbers with the user first (list_beans shows them).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | Optional note, recorded on the surviving coffee's notes with the merge | |
| from_bean_id | Yes | The duplicate: the coffee number that will be emptied and archived | |
| into_bean_id | Yes | The coffee number that keeps everything |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| moved | Yes | ||
| status | Yes | ||
| message | Yes | ||
| into_bean_id | Yes | ||
| active_followed | Yes | ||
| replaced_recipes | Yes |