SELECT table_name
FROM information_schema.tables
WHERE table_schema = DATABASE()
  AND table_name IN ('qipai_cleaning_tasks', 'qipai_cleaning_task_events');

SELECT column_name
FROM information_schema.columns
WHERE table_schema = DATABASE()
  AND table_name = 'qipai_cleaning_tasks'
  AND column_name IN (
    'task_no', 'status', 'cleaner_user_id', 'reward_cents',
    'photo_urls_json', 'reject_reason', 'started_at', 'submitted_at'
  );

SELECT index_name
FROM information_schema.statistics
WHERE table_schema = DATABASE()
  AND table_name = 'qipai_cleaning_tasks'
  AND index_name IN (
    'uq_qipai_cleaning_task_no', 'uq_qipai_cleaning_task_order',
    'idx_qipai_cleaning_hall', 'idx_qipai_cleaning_cleaner'
  );

SELECT code
FROM qipai_permissions
WHERE code IN ('cleaning.task.read', 'cleaning.task.write', 'cleaning.statistics.read');

SELECT version
FROM qipai_schema_migrations
WHERE version = '2026062525';
