-- BEGIN CHANGE: drop unused / legacy tables (High + Very High confidence)
-- market_* / login_history: engine migrations one-shot only (db_version already past)
-- polls/poll_votes: replaced by z_polls*
-- announcements/z_forum/z_bug_*/z_shop_donates: Gesior leftovers, no portal writers

SELECT table_name, table_rows
FROM information_schema.tables
WHERE table_schema = DATABASE()
  AND table_name IN (
    'market_offers','market_history','login_history','polls','poll_votes',
    'announcements','z_bug_logs','z_bug_tracker','z_shop_donates','z_forum'
  )
ORDER BY table_name;

DROP TABLE IF EXISTS `market_offers`;
DROP TABLE IF EXISTS `market_history`;
DROP TABLE IF EXISTS `login_history`;
DROP TABLE IF EXISTS `poll_votes`;
DROP TABLE IF EXISTS `polls`;
DROP TABLE IF EXISTS `announcements`;
DROP TABLE IF EXISTS `z_bug_logs`;
DROP TABLE IF EXISTS `z_bug_tracker`;
DROP TABLE IF EXISTS `z_shop_donates`;
DROP TABLE IF EXISTS `z_forum`;
-- END CHANGE
