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

ENV["SETUP"] = "1"
# FreeBattle.destroy_all
FreeBattle.setup

tp FreeBattle

# >> |-----+----------------------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------+---------------------------+---------------------------+-------------------+----------------------------------------+------------------+-----------------+----------------+-----------------|
# >> | id  | key                              | kifu_url | kifu_body                                                                                                                                                                                                                                                                                                                                    | turn_max | meta_info                                                                                                                                                                                                                                                                            | battled_at                | created_at                | updated_at                | colosseum_user_id | title                                  | defense_tag_list | attack_tag_list | other_tag_list | secret_tag_list |
# >> |-----+----------------------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------+---------------------------+---------------------------+-------------------+----------------------------------------+------------------+-----------------+----------------+-----------------|
# >> | 220 | 2yXP3bK8F8F1zWkczf4SqpqZ         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:50 +0900 | 2019-03-09 18:43:50 +0900 |                   | 1番目の何かの棋譜                      |                  |                 |                |                 |
# >> | 221 | wVkKyzJUZMEgujLJhSqdH7TL         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:50 +0900 | 2019-03-09 18:43:50 +0900 |                   | 2番目の何かの棋譜                      |                  |                 |                |                 |
# >> | 222 | hSJMnhSAuxEX1o2kcGCkqQS1         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:50 +0900 | 2019-03-09 18:43:50 +0900 |                   | 3番目の何かの棋譜                      |                  |                 |                |                 |
# >> | 223 | JDyatDXgcL6shPDwx6xXxhEf         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:50 +0900 | 2019-03-09 18:43:50 +0900 |                   | 4番目の何かの棋譜                      |                  |                 |                |                 |
# >> | 224 | E6J4kKYiKEM9U4Y6sBJsgoDP         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:50 +0900 | 2019-03-09 18:43:50 +0900 |                   | 5番目の何かの棋譜                      |                  |                 |                |                 |
# >> | 225 | crVzJqed45qNcvgyB7rzjqSP         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:50 +0900 | 2019-03-09 18:43:50 +0900 |                   | 6番目の何かの棋譜                      |                  |                 |                |                 |
# >> | 226 | x9GeoxtP15P8vqo4DXTgBFjG         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 7番目の何かの棋譜                      |                  |                 |                |                 |
# >> | 227 | JxiEKyJjGxUqPpJ9rfqNX3Gn         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 8番目の何かの棋譜                      |                  |                 |                |                 |
# >> | 228 | gdsiQiho3zvrd47z7ktQYQVz         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 9番目の何かの棋譜                      |                  |                 |                |                 |
# >> | 229 | v7NFoG6tKDhjND8NqWwFn9Qp         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 10番目の何かの棋譜                     |                  |                 |                |                 |
# >> | 230 | 6LqN75gVpnAgq8EVZZXcmVPs         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 11番目の何かの棋譜                     |                  |                 |                |                 |
# >> | 231 | Dhah6fQ9VmXFUS3yS8NnGxZo         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 12番目の何かの棋譜                     |                  |                 |                |                 |
# >> | 232 | gWdg783V8svgo6AbYUCzG7N5         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 13番目の何かの棋譜                     |                  |                 |                |                 |
# >> | 233 | efsNWB8KTLBPmNXfUnvajZso         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 14番目の何かの棋譜                     |                  |                 |                |                 |
# >> | 234 | xCZ3WPp1A63mQmtf4uQ2C4ic         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 15番目の何かの棋譜                     |                  |                 |                |                 |
# >> | 235 | LKHtmDE1pWYeTNdtUNhxfetV         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 16番目の何かの棋譜                     |                  |                 |                |                 |
# >> | 236 | n1dwjjsv3HbqJCNUvAffJ32u         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 17番目の何かの棋譜                     |                  |                 |                |                 |
# >> | 237 | JUrunw4FLgHrM93sPsVXTWee         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 18番目の何かの棋譜                     |                  |                 |                |                 |
# >> | 238 | dies63WHDdWSpXcYwULmDZnF         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 19番目の何かの棋譜                     |                  |                 |                |                 |
# >> | 239 | sUHP6XFr4tzpusvFEFVQXqvm         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 20番目の何かの棋譜                     |                  |                 |                |                 |
# >> | 240 | eeuozFKSdFLwQTC4qXhXyKqP         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 21番目の何かの棋譜                     |                  |                 |                |                 |
# >> | 241 | hu1W4EaLH1ho9ZSxTPhc64iq         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 22番目の何かの棋譜                     |                  |                 |                |                 |
# >> | 242 | niP1vUUmtjnbpcBWsJ5kLquU         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 23番目の何かの棋譜                     |                  |                 |                |                 |
# >> | 243 | YNVvUpTAKYz9B1G138xXxhKZ         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 24番目の何かの棋譜                     |                  |                 |                |                 |
# >> | 244 | cYWpHwNscMnVNhvSP4TC6mxr         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 25番目の何かの棋譜                     |                  |                 |                |                 |
# >> | 245 | zGEJ4WXawt4fDdF8ZtXFRm6r         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 26番目の何かの棋譜                     |                  |                 |                |                 |
# >> | 246 | Eb62z36Py4b8xdX4RshqJg8G         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 27番目の何かの棋譜                     |                  |                 |                |                 |
# >> | 247 | HKCfvBhEhqezgtGC2S1KbmSj         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 28番目の何かの棋譜                     |                  |                 |                |                 |
# >> | 248 | 6NhmcZitRtzd5X4ux5DsErmk         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 29番目の何かの棋譜                     |                  |                 |                |                 |
# >> | 249 | JK3BHP8VGrRGPbr3bn3xf2WC         |          |                                                                                                                                                                                                                                                                                                                                              |        0 | {:header=>{}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{}}                                                                                                                                                                                                 | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:51 +0900 | 2019-03-09 18:43:51 +0900 |                   | 30番目の何かの棋譜                     |                  |                 |                |                 |
# >> | 250 | 116281f5af298a8bd2e06c0082f85ff1 |          | 先手の囲い：片美濃囲い\n先手の戦型：三間飛車\n後手の戦型：一手損角換わり\n手合割：平手\n手数----指手---------消費時間--\n   1 ７六歩(77)   (00:00/00:00:00)\n   2 ３四歩(33)   (00:00/00:00:00)\n   3 ７五歩(76)   (00:00/00:00:00)\n   4 ８四歩(83)   (00:00/00:00:00)\n   5 ７八飛(28)   (00:00/00:00:00)\n*▲戦型：三間飛車\n   6 ８五... |       33 | {:header=>{"先手の囲い"=>"片美濃囲い", "先手の戦型"=>"三間飛車", "後手の戦型"=>"一手損角換わり", "手合割"=>"平手"}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{"先手の囲い"=>["片美濃囲い"], "先手の戦型"=>["三間飛車"], "後手の戦型"=>["一手損角換わり"]}} | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:52 +0900 | 2019-03-09 18:43:52 +0900 |                 1 | 石田流の基本3 ▲77桂型                 |                  |                 |                |                 |
# >> | 251 | 2417ab69cb70a7e36fe21cc6f62e4742 |          | 先手の囲い：片美濃囲い\n先手の戦型：三間飛車\n後手の戦型：一手損角換わり\n手合割：平手\n手数----指手---------消費時間--\n   1 ７六歩(77)   (00:00/00:00:00)\n   2 ３四歩(33)   (00:00/00:00:00)\n   3 ７五歩(76)   (00:00/00:00:00)\n   4 ８四歩(83)   (00:00/00:00:00)\n   5 ７八飛(28)   (00:00/00:00:00)\n*▲戦型：三間飛車\n   6 ８五... |       33 | {:header=>{"先手の囲い"=>"片美濃囲い", "先手の戦型"=>"三間飛車", "後手の戦型"=>"一手損角換わり", "手合割"=>"平手"}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{"先手の囲い"=>["片美濃囲い"], "先手の戦型"=>["三間飛車"], "後手の戦型"=>["一手損角換わり"]}} | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:52 +0900 | 2019-03-09 18:43:52 +0900 |                 1 | 石田流の基本2 飛車交換に応じてくれない |                  |                 |                |                 |
# >> | 252 | 64d3d0d631094642c29ced5cb677d54e |          | 先手の囲い：片美濃囲い\n先手の戦型：三間飛車\n後手の戦型：一手損角換わり\n手合割：平手\n手数----指手---------消費時間--\n   1 ７六歩(77)   (00:00/00:00:00)\n   2 ３四歩(33)   (00:00/00:00:00)\n   3 ７五歩(76)   (00:00/00:00:00)\n   4 ８四歩(83)   (00:00/00:00:00)\n   5 ７八飛(28)   (00:00/00:00:00)\n*▲戦型：三間飛車\n   6 ８五... |       35 | {:header=>{"先手の囲い"=>"片美濃囲い", "先手の戦型"=>"三間飛車", "後手の戦型"=>"一手損角換わり", "手合割"=>"平手"}, :detail_names=>[[], []], :simple_names=>[[], []], :skill_set_hash=>{"先手の囲い"=>["片美濃囲い"], "先手の戦型"=>["三間飛車"], "後手の戦型"=>["一手損角換わり"]}} | 0001-01-01 00:00:00 +0918 | 2019-03-09 18:43:52 +0900 | 2019-03-09 18:43:52 +0900 |                 1 | 石田流の基本1 飛車交換に応じてくれる   |                  |                 |                |                 |
# >> |-----+----------------------------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------+---------------------------+---------------------------+-------------------+----------------------------------------+------------------+-----------------+----------------+-----------------|
