#!/usr/bin/env ruby
require File.expand_path('../../config/environment', __FILE__)

tp ActiveRecord::Base.connection.tables.collect { |table| [table, ActiveRecord::Base.connection.select_value("select count(*) from #{table}")] }.to_h
# >> |--------------------------------+------|
# >> |                 actb_bad_marks | 0    |
# >> |        actb_battle_memberships | 0    |
# >> |                   actb_battles | 0    |
# >> |                actb_clip_marks | 0    |
# >> |           actb_emotion_folders | 3    |
# >> |                  actb_emotions | 0    |
# >> |                    actb_finals | 6    |
# >> |                   actb_folders | 12   |
# >> |                actb_good_marks | 0    |
# >> |                 actb_histories | 0    |
# >> |                    actb_judges | 4    |
# >> |                  actb_lineages | 8    |
# >> |            actb_lobby_messages | 0    |
# >> |             actb_main_xrecords | 4    |
# >> |             actb_moves_answers | 1    |
# >> |             actb_notifications | 0    |
# >> |                  actb_ox_marks | 3    |
# >> |                actb_ox_records | 1    |
# >> |         actb_question_messages | 0    |
# >> |                 actb_questions | 1    |
# >> |          actb_room_memberships | 0    |
# >> |             actb_room_messages | 0    |
# >> |                     actb_rooms | 0    |
# >> |                     actb_rules | 14   |
# >> |           actb_season_xrecords | 4    |
# >> |                   actb_seasons | 1    |
# >> |                  actb_settings | 4    |
# >> |                    actb_skills | 21   |
# >> |             actb_source_abouts | 2    |
# >> |                actb_vs_records | 0    |
# >> |     active_storage_attachments | 6    |
# >> |           active_storage_blobs | 6    |
# >> | active_storage_variant_records | 0    |
# >> |                       app_logs | 0    |
# >> |           ar_internal_metadata | 1    |
# >> |                     auth_infos | 0    |
# >> |             cpu_battle_records | 0    |
# >> |           emox_emotion_folders | 0    |
# >> |                    emox_finals | 6    |
# >> |                    emox_judges | 4    |
# >> |                  emox_lineages | 0    |
# >> |                  emox_ox_marks | 0    |
# >> |                     emox_rules | 1    |
# >> |                   emox_seasons | 0    |
# >> |                    emox_skills | 0    |
# >> |             emox_source_abouts | 0    |
# >> |                   free_battles | 1030 |
# >> |                         judges | 3    |
# >> |               kiwi_access_logs | 21   |
# >> |           kiwi_banana_messages | 37   |
# >> |                   kiwi_bananas | 12   |
# >> |                   kiwi_folders | 3    |
# >> |                    kiwi_lemons | 12   |
# >> |                      locations | 2    |
# >> |                        presets | 19   |
# >> |                       profiles | 4    |
# >> |              schema_migrations | 49   |
# >> |                  swars_battles | 3    |
# >> |       swars_crawl_reservations | 1    |
# >> |                   swars_finals | 7    |
# >> |                   swars_grades | 40   |
# >> |        swars_membership_extras | 6    |
# >> |              swars_memberships | 6    |
# >> |                    swars_rules | 3    |
# >> |              swars_search_logs | 26   |
# >> |                    swars_users | 28   |
# >> |                   swars_xmodes | 3    |
# >> |              swars_zip_dl_logs | 1    |
# >> |                       taggings | 98   |
# >> |                           tags | 28   |
# >> |                    ppl_leagues | 4    |
# >> |                ppl_memberships | 122  |
# >> |                      ppl_users | 68   |
# >> |                          users | 4    |
# >> |               wkbk_access_logs | 1    |
# >> |              wkbk_answer_kinds | 2    |
# >> |               wkbk_answer_logs | 3    |
# >> |                  wkbk_articles | 10   |
# >> |                     wkbk_books | 6    |
# >> |                 wkbk_bookships | 10   |
# >> |                   wkbk_folders | 3    |
# >> |                  wkbk_lineages | 8    |
# >> |             wkbk_moves_answers | 0    |
# >> |                 wkbk_sequences | 14   |
# >> |                      xsettings | 2    |
# >> |                xy_master_rules | 4    |
# >> |         xy_master_time_records | 0    |
# >> |--------------------------------+------|
