14 lines
641 B
PL/PgSQL
14 lines
641 B
PL/PgSQL
BEGIN;
|
|
CREATE TABLE public.mcp_operation_replay_tombstones (
|
|
operation_id uuid PRIMARY KEY,
|
|
plan_id uuid NOT NULL UNIQUE,
|
|
connection_id uuid NOT NULL REFERENCES public.mcp_connections(id),
|
|
idempotency_digest text NOT NULL CHECK (idempotency_digest ~ '^[0-9a-f]{64}$'),
|
|
action_id text NOT NULL CHECK (length(action_id) BETWEEN 1 AND 200),
|
|
target_server_ids bigint[] NOT NULL CHECK (array_position(target_server_ids, NULL) IS NULL),
|
|
target_global boolean NOT NULL,
|
|
UNIQUE (connection_id,idempotency_digest)
|
|
);
|
|
INSERT INTO public.schema_migrations(id) VALUES ('0045_mcp_operation_replay_tombstones') ON CONFLICT(id) DO NOTHING;
|
|
COMMIT;
|