-- 005: Address mappings (translate-service core)
CREATE TABLE IF NOT EXISTS address_mappings (
    user_id UUID PRIMARY KEY REFERENCES users(id) ON DELETE CASCADE,
    chain_address VARCHAR(42) NOT NULL UNIQUE,
    signature TEXT,
    created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE INDEX idx_address_mappings_chain_address ON address_mappings(chain_address);
