feat(migration): add keygen_session_id column to mpc_sessions table

For sign sessions, this column stores the reference to the keygen session
whose key shares should be used for signing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2025-12-06 09:16:31 -08:00
parent 3d176e1132
commit a1b2b760ab
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,7 @@
-- Migration 007 Down: Remove keygen_session_id from mpc_sessions table
-- Drop index
DROP INDEX IF EXISTS idx_mpc_sessions_keygen_session_id;
-- Remove column
ALTER TABLE mpc_sessions DROP COLUMN IF EXISTS keygen_session_id;

View File

@ -0,0 +1,12 @@
-- Migration 007: Add keygen_session_id to mpc_sessions table
-- Description: For sign sessions, this column stores the reference to the keygen session
-- whose key shares should be used for signing.
-- Add keygen_session_id column to mpc_sessions table
ALTER TABLE mpc_sessions ADD COLUMN keygen_session_id UUID;
-- Add index for efficient lookups
CREATE INDEX idx_mpc_sessions_keygen_session_id ON mpc_sessions(keygen_session_id);
-- Add comment
COMMENT ON COLUMN mpc_sessions.keygen_session_id IS 'For sign sessions: references the keygen session whose key shares to use';