<?php

declare(strict_types=1);

namespace Plugin\tnt_mcp\src\Mcp\Action;

/**
 * How the journalled before-snapshot is meant to be replayed. It cannot be inferred from the
 * snapshot itself: restoring a delete-and-reinsert table means wiping what is there now and
 * putting the old rows back ({@see self::ReplaceRows}), while restoring a pure insert means
 * removing what appeared ({@see self::DeleteInserted}). Applying the wrong one silently
 * multiplies or erases rows.
 *
 * String-backed so a YAML `journal.undo:` value maps straight onto a case.
 */
enum UndoStrategy: string
{
    case ReplaceRows    = 'replaceRows';
    case DeleteInserted = 'deleteInserted';
    case None           = 'none';
}
