helpyourneighbour/backend/migrations/002_idempotency_table.sql
OpenClaw b44e7bf46c
Some checks are pending
Docker Test / test (push) Waiting to run
fix(#24): Implement idempotency protection for critical write operations
2026-03-07 00:13:31 +00:00

9 lines
No EOL
313 B
SQL

-- Migration: 002_idempotency_table
-- Description: Add idempotency_keys table for handling idempotent requests
CREATE TABLE IF NOT EXISTS idempotency_keys (
id BIGINT PRIMARY KEY AUTO_INCREMENT,
key VARCHAR(255) NOT NULL UNIQUE,
response_body TEXT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);