CREATE TABLE IF NOT EXISTS payment_refund_intent ( refund_no VARCHAR(32) CHARACTER SET ascii COLLATE ascii_bin NOT NULL PRIMARY KEY, order_id BIGINT NOT NULL, amount DECIMAL(20,0) NOT NULL, created_time DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, KEY idx_refund_intent_order(order_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- Never delete an uncertain intent merely to retry with a different amount.