-- ========================================
-- 查找现有的礼物相关表
-- ========================================

-- 1. 查找所有包含gift的表
SELECT 
    TABLE_NAME,
    TABLE_COMMENT,
    CREATE_TIME
FROM information_schema.TABLES 
WHERE TABLE_SCHEMA = 'zhibo' 
  AND TABLE_NAME LIKE '%gift%'
ORDER BY TABLE_NAME;

-- 2. 查找所有包含reward的表（打赏相关）
SELECT 
    TABLE_NAME,
    TABLE_COMMENT,
    CREATE_TIME
FROM information_schema.TABLES 
WHERE TABLE_SCHEMA = 'zhibo' 
  AND TABLE_NAME LIKE '%reward%'
ORDER BY TABLE_NAME;

-- 3. 查找所有包含present的表（礼物相关）
SELECT 
    TABLE_NAME,
    TABLE_COMMENT,
    CREATE_TIME
FROM information_schema.TABLES 
WHERE TABLE_SCHEMA = 'zhibo' 
  AND TABLE_NAME LIKE '%present%'
ORDER BY TABLE_NAME;

-- 4. 如果找到了礼物表，查看其结构
-- 请根据上面的结果，取消下面对应表的注释来查看结构

-- SHOW FULL COLUMNS FROM eb_gift;
-- SHOW FULL COLUMNS FROM eb_gift_record;
-- SHOW FULL COLUMNS FROM eb_gift_reward;

-- 5. 如果找到了礼物表，查看现有数据
-- SELECT * FROM eb_gift LIMIT 10;
-- SELECT * FROM eb_gift_record LIMIT 10;
