suna/backend/supabase/migrations/20250607000000_fix_encrypte...

16 lines
445 B
MySQL
Raw Normal View History

2025-06-07 14:24:59 +08:00
BEGIN;
-- Fix encrypted_config column type to store base64 strings properly
-- Change from BYTEA to TEXT to avoid encoding issues
2025-06-24 15:05:09 +08:00
-- Only proceed if the table exists
DO $$
BEGIN
IF EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'user_mcp_credentials') THEN
DELETE FROM user_mcp_credentials;
ALTER TABLE user_mcp_credentials
ALTER COLUMN encrypted_config TYPE TEXT;
END IF;
END $$;
2025-06-07 14:24:59 +08:00
COMMIT;