Add wallet_address field to user_profiles for wallet verification

cgen-e1e8eec4fb7c45c8aa3ad1bd11ccdef9
This commit is contained in:
Builder.io 2025-11-15 01:34:14 +00:00
parent 6da3bc94e1
commit e9133cd1f9

View file

@ -0,0 +1,14 @@
-- Migration: Add wallet verification support
-- This adds a wallet_address field to user_profiles to support the Bridge UI
-- for Phase 2 (Unified Identity: .aethex TLD verification)
ALTER TABLE user_profiles
ADD COLUMN IF NOT EXISTS wallet_address VARCHAR(255) UNIQUE NULL DEFAULT NULL;
-- Create an index for faster wallet lookups during verification
CREATE INDEX IF NOT EXISTS idx_user_profiles_wallet_address
ON user_profiles(wallet_address)
WHERE wallet_address IS NOT NULL;
-- Add a comment explaining the field
COMMENT ON COLUMN user_profiles.wallet_address IS 'Connected wallet address (e.g., 0x123...). Used for Phase 2 verification and .aethex TLD checks.';