微炭酸ログ

Ruby や Rails を中心に。

【Railsで学生野球連盟のHP作成】開発記録003 試合情報テーブル作成

試合情報テーブルはすでに試合速報サイトとしてリリース済みなのですが、HPに組み込むにあたり、カラムを見直そうと思います。

HPに組み込む話は(仮)なのですが、実現すればローンチ半年経たずにリニューアルですw

どちらにしても連盟の方から入力欄等の追加要望がありましたし、ちょうどいいです。

 

次はherokuではないはずなので、うまくできるか不安です。逆にサーバーとかのサービス説明も日本語オンリーになるはずなので、そこはありがたいはず(herokuも日本語ナレッジいっぱいあったので問題はなかったですが)。

 

<見直し>

・roundカラムの値域
現在:第一節, 第二節
改修:第一節, 第二節, 一回戦, 二回戦, 準々決勝, 準決勝, 決勝

 

・新規カラムの追加
その1
カラム名:第○試合(number)(integer)
値域:第一試合(1), 第二試合(2), 第三試合(3)

その2
カラム名:試合開始時刻(start_time)(time)

その3
カラム名:試合終了時刻(end_time)(time)

 

<scaffold> ※わかりやすさのため改行しています。

rails g scaffold game_info
event:string ※大会名
round:string ※上記参照
disp_date:date
batting_first_team:string
field_first_team:string
stadium:string
number:integer ※上記参照

start_time:time
end_time:time
pitcher_top:string
pitcher_bottom:string
catcher_top:string
catcher_bottom:string
homerun_top:string
homerun_bottom:string
threebase_top:string
threebase_bottom:string
twobase_top:string
twobase_bottom:string
message:string
top1:integer
bottom1:integer
top2:integer
bottom2:integer
top3:integer
bottom3:integer
top4:integer
bottom4:integer
top5:integer
bottom5:integer
top6:integer
bottom6:integer
top7:integer
bottom7:integer
top8:integer
bottom8:integer
top9:integer
bottom9:integer
top10:integer
bottom10:integer
top11:integer
bottom11:integer
top12:integer
bottom12:integer
top13:integer
bottom13:integer
top14:integer
bottom14:integer
top15:integer
bottom15:integer
gameset_flag:boolean