-- ====================================
-- 步骤1：全面检查数据库表结构
-- ====================================

-- 1.1 检查xq_client_log表的所有字段定义
SELECT 
    COLUMN_NAME as '字段名',
    DATA_TYPE as '数据类型',
    CHARACTER_MAXIMUM_LENGTH as '字符最大长度',
    NUMERIC_PRECISION as '数字精度',
    NUMERIC_SCALE as '数字小数位',
    IS_NULLABLE as '是否可空',
    COLUMN_DEFAULT as '默认值',
    COLUMN_TYPE as '完整类型'
FROM INFORMATION_SCHEMA.COLUMNS 
WHERE TABLE_SCHEMA = DATABASE() 
AND TABLE_NAME = 'xq_client_log'
ORDER BY ORDINAL_POSITION;

-- 1.2 检查jbq_client_log表的所有字段定义
SELECT 
    COLUMN_NAME as '字段名',
    DATA_TYPE as '数据类型',
    CHARACTER_MAXIMUM_LENGTH as '字符最大长度',
    NUMERIC_PRECISION as '数字精度',
    NUMERIC_SCALE as '数字小数位',
    IS_NULLABLE as '是否可空',
    COLUMN_DEFAULT as '默认值',
    COLUMN_TYPE as '完整类型'
FROM INFORMATION_SCHEMA.COLUMNS 
WHERE TABLE_SCHEMA = DATABASE() 
AND TABLE_NAME = 'jbq_client_log'
ORDER BY ORDINAL_POSITION;

-- 1.3 检查jbq_server_log表的所有字段定义
SELECT 
    COLUMN_NAME as '字段名',
    DATA_TYPE as '数据类型',
    CHARACTER_MAXIMUM_LENGTH as '字符最大长度',
    NUMERIC_PRECISION as '数字精度',
    NUMERIC_SCALE as '数字小数位',
    IS_NULLABLE as '是否可空',
    COLUMN_DEFAULT as '默认值',
    COLUMN_TYPE as '完整类型'
FROM INFORMATION_SCHEMA.COLUMNS 
WHERE TABLE_SCHEMA = DATABASE() 
AND TABLE_NAME = 'jbq_server_log'
ORDER BY ORDINAL_POSITION;

-- 1.4 检查xq_client_log表的索引和约束
SHOW INDEX FROM xq_client_log;

-- 1.5 检查表的创建语句
SHOW CREATE TABLE xq_client_log;
SHOW CREATE TABLE jbq_client_log;
SHOW CREATE TABLE jbq_server_log;

