-- 检查user表当前结构
USE peidu;
DESC user;

-- 检查哪些字段不存在
SELECT 
    'real_name' as field_name,
    COUNT(*) as exists_count
FROM information_schema.COLUMNS 
WHERE TABLE_SCHEMA = 'peidu' AND TABLE_NAME = 'user' AND COLUMN_NAME = 'real_name'
UNION ALL
SELECT 
    'province' as field_name,
    COUNT(*) as exists_count
FROM information_schema.COLUMNS 
WHERE TABLE_SCHEMA = 'peidu' AND TABLE_NAME = 'user' AND COLUMN_NAME = 'province'
UNION ALL
SELECT 
    'city' as field_name,
    COUNT(*) as exists_count
FROM information_schema.COLUMNS 
WHERE TABLE_SCHEMA = 'peidu' AND TABLE_NAME = 'user' AND COLUMN_NAME = 'city'
UNION ALL
SELECT 
    'verification_status' as field_name,
    COUNT(*) as exists_count
FROM information_schema.COLUMNS 
WHERE TABLE_SCHEMA = 'peidu' AND TABLE_NAME = 'user' AND COLUMN_NAME = 'verification_status'
UNION ALL
SELECT 
    'id_card' as field_name,
    COUNT(*) as exists_count
FROM information_schema.COLUMNS 
WHERE TABLE_SCHEMA = 'peidu' AND TABLE_NAME = 'user' AND COLUMN_NAME = 'id_card'
UNION ALL
SELECT 
    'id_card_front' as field_name,
    COUNT(*) as exists_count
FROM information_schema.COLUMNS 
WHERE TABLE_SCHEMA = 'peidu' AND TABLE_NAME = 'user' AND COLUMN_NAME = 'id_card_front'
UNION ALL
SELECT 
    'id_card_back' as field_name,
    COUNT(*) as exists_count
FROM information_schema.COLUMNS 
WHERE TABLE_SCHEMA = 'peidu' AND TABLE_NAME = 'user' AND COLUMN_NAME = 'id_card_back';
