Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

roll up seeds and move quotes to its own files

  • Loading branch information...
commit 9fc5c49d5c6b094a87095b580cfbddedb2844933 1 parent c734d44
@geraldb geraldb authored
View
622 db/schema.rb
@@ -1,311 +1,311 @@
-# encoding: UTF-8
-# This file is auto-generated from the current state of the database. Instead
-# of editing this file, please use the migrations feature of Active Record to
-# incrementally modify your database, and then regenerate this schema definition.
-#
-# Note that this schema.rb definition is the authoritative source for your
-# database schema. If you need to create the application database on another
-# system, you should be using db:schema:load, not running all the migrations
-# from scratch. The latter is a flawed and unsustainable approach (the more migrations
-# you'll amass, the slower it'll run and the greater likelihood for issues).
-#
-# It's strongly recommended to check this file into your version control system.
-
-ActiveRecord::Schema.define(:version => 20120305214015) do
-
- create_table "actions", :force => true do |t|
- t.text "text"
- t.string "tmpl"
- t.integer "user_id"
- t.integer "event_id"
- t.integer "pool_id"
- t.integer "game_id"
- t.integer "tip_id"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- create_table "bonus_answers", :force => true do |t|
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- create_table "bonus_points", :force => true do |t|
- t.integer "user_id", :null => false
- t.integer "pool_id", :null => false
- t.integer "round_id", :null => false
- t.integer "round_pts", :default => 0, :null => false
- t.integer "round_pos", :default => 0, :null => false
- t.integer "total_pts", :default => 0, :null => false
- t.integer "total_pos", :default => 0, :null => false
- t.integer "diff_total_pos", :default => 0, :null => false
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- add_index "bonus_points", ["user_id", "pool_id", "round_id"], :name => "index_bonus_points_on_user_id_and_pool_id_and_round_id", :unique => true
-
- create_table "bonus_questions", :force => true do |t|
- t.integer "round_id", :null => false
- t.string "title", :null => false
- t.integer "pos", :null => false
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- create_table "bonus_rounds", :force => true do |t|
- t.integer "pool_id", :null => false
- t.string "title", :null => false
- t.integer "pos", :null => false
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- create_table "bonus_tips", :force => true do |t|
- t.integer "user_id", :null => false
- t.integer "question_id", :null => false
- t.integer "pts", :default => 0, :null => false
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- create_table "event_quotes", :force => true do |t|
- t.integer "service_id", :null => false
- t.integer "event_id", :null => false
- t.integer "team_id", :null => false
- t.decimal "odds", :null => false
- t.string "comments"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- create_table "events", :force => true do |t|
- t.string "title", :null => false
- t.string "key", :null => false
- t.boolean "team3", :default => true, :null => false
- t.datetime "start_at", :null => false
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- add_index "events", ["key"], :name => "index_events_on_key", :unique => true
-
- create_table "events_teams", :force => true do |t|
- t.integer "event_id", :null => false
- t.integer "team_id", :null => false
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- add_index "events_teams", ["event_id", "team_id"], :name => "index_events_teams_on_event_id_and_team_id", :unique => true
- add_index "events_teams", ["event_id"], :name => "index_events_teams_on_event_id"
-
- create_table "games", :force => true do |t|
- t.integer "round_id", :null => false
- t.integer "pos", :null => false
- t.integer "group_id"
- t.integer "team1_id", :null => false
- t.integer "team2_id", :null => false
- t.datetime "play_at", :null => false
- t.boolean "knockout", :default => false, :null => false
- t.boolean "home", :default => true, :null => false
- t.boolean "locked", :default => false, :null => false
- t.integer "score1"
- t.integer "score2"
- t.integer "score3"
- t.integer "score4"
- t.integer "score5"
- t.integer "score6"
- t.integer "next_game_id"
- t.integer "prev_game_id"
- t.string "toto12x"
- t.string "key"
- t.string "type"
- t.boolean "calc", :default => false, :null => false
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- add_index "games", ["group_id"], :name => "index_games_on_group_id"
- add_index "games", ["key"], :name => "index_games_on_key", :unique => true
- add_index "games", ["next_game_id"], :name => "index_games_on_next_game_id"
- add_index "games", ["prev_game_id"], :name => "index_games_on_prev_game_id"
- add_index "games", ["round_id"], :name => "index_games_on_round_id"
-
- create_table "group_quotes", :force => true do |t|
- t.integer "service_id", :null => false
- t.integer "group_id", :null => false
- t.integer "team_id", :null => false
- t.decimal "odds", :null => false
- t.string "comments"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- create_table "groups", :force => true do |t|
- t.integer "event_id", :null => false
- t.string "title", :null => false
- t.integer "pos", :null => false
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- add_index "groups", ["event_id"], :name => "index_groups_on_event_id"
-
- create_table "groups_teams", :force => true do |t|
- t.integer "group_id", :null => false
- t.integer "team_id", :null => false
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- add_index "groups_teams", ["group_id", "team_id"], :name => "index_groups_teams_on_group_id_and_team_id", :unique => true
- add_index "groups_teams", ["group_id"], :name => "index_groups_teams_on_group_id"
-
- create_table "plays", :force => true do |t|
- t.integer "user_id", :null => false
- t.integer "pool_id", :null => false
- t.integer "team1_id"
- t.integer "team2_id"
- t.integer "team3_id"
- t.integer "total_pts", :default => 0, :null => false
- t.integer "total_pos", :default => 0, :null => false
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- add_index "plays", ["pool_id"], :name => "index_plays_on_pool_id"
- add_index "plays", ["user_id", "pool_id"], :name => "index_plays_on_user_id_and_pool_id", :unique => true
- add_index "plays", ["user_id"], :name => "index_plays_on_user_id"
-
- create_table "points", :force => true do |t|
- t.integer "user_id", :null => false
- t.integer "pool_id", :null => false
- t.integer "round_id", :null => false
- t.integer "round_pts", :default => 0, :null => false
- t.integer "round_pos", :default => 0, :null => false
- t.integer "total_pts", :default => 0, :null => false
- t.integer "total_pos", :default => 0, :null => false
- t.integer "diff_total_pos", :default => 0, :null => false
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- add_index "points", ["user_id", "pool_id", "round_id"], :name => "index_points_on_user_id_and_pool_id_and_round_id", :unique => true
-
- create_table "pools", :force => true do |t|
- t.integer "event_id", :null => false
- t.string "title", :null => false
- t.integer "user_id", :null => false
- t.boolean "fix", :default => false, :null => false
- t.boolean "public", :default => true, :null => false
- t.boolean "locked", :default => false, :null => false
- t.text "welcome"
- t.text "welcome_html"
- t.string "key"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- add_index "pools", ["event_id"], :name => "index_pools_on_event_id"
- add_index "pools", ["key"], :name => "index_pools_on_key", :unique => true
- add_index "pools", ["user_id"], :name => "index_pools_on_user_id"
-
- create_table "props", :force => true do |t|
- t.string "key", :null => false
- t.string "value", :null => false
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- create_table "quotes", :force => true do |t|
- t.integer "service_id", :null => false
- t.integer "game_id", :null => false
- t.decimal "odds1", :null => false
- t.decimal "oddsx", :null => false
- t.decimal "odds2", :null => false
- t.string "comments"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- create_table "rounds", :force => true do |t|
- t.integer "event_id", :null => false
- t.string "title", :null => false
- t.string "title2"
- t.integer "pos", :null => false
- t.boolean "playoff", :default => false, :null => false
- t.boolean "flex", :default => true, :null => false
- t.boolean "fix", :default => true, :null => false
- t.string "type"
- t.boolean "calc", :default => false, :null => false
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- add_index "rounds", ["event_id"], :name => "index_rounds_on_event_id"
-
- create_table "services", :force => true do |t|
- t.string "title", :null => false
- t.string "key", :null => false
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- create_table "teams", :force => true do |t|
- t.string "title", :null => false
- t.string "title2"
- t.string "key", :null => false
- t.string "img"
- t.string "tag"
- t.string "type"
- t.boolean "calc", :default => false, :null => false
- t.string "calc_rule"
- t.string "calc_value"
- t.integer "calc_team_id"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- add_index "teams", ["key"], :name => "index_teams_on_key", :unique => true
-
- create_table "tips", :force => true do |t|
- t.integer "user_id", :null => false
- t.integer "pool_id", :null => false
- t.integer "game_id", :null => false
- t.integer "score1"
- t.integer "score2"
- t.integer "score3"
- t.integer "score4"
- t.integer "score5"
- t.integer "score6"
- t.string "toto12x"
- t.string "type"
- t.boolean "calc", :default => false, :null => false
- t.integer "calc_team1_id"
- t.integer "calc_team2_id"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- add_index "tips", ["game_id"], :name => "index_tips_on_game_id"
- add_index "tips", ["pool_id"], :name => "index_tips_on_pool_id"
- add_index "tips", ["user_id", "pool_id", "game_id"], :name => "index_tips_on_user_id_and_pool_id_and_game_id", :unique => true
- add_index "tips", ["user_id"], :name => "index_tips_on_user_id"
-
- create_table "users", :force => true do |t|
- t.string "name", :null => false
- t.string "email", :null => false
- t.string "password_digest"
- t.string "key", :null => false
- t.boolean "admin", :default => false, :null => false
- t.boolean "guest", :default => false, :null => false
- t.boolean "active", :default => true, :null => false
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
- end
-
- add_index "users", ["email"], :name => "index_users_on_email", :unique => true
- add_index "users", ["key"], :name => "index_users_on_key", :unique => true
-
-end
+# encoding: UTF-8
+# This file is auto-generated from the current state of the database. Instead
+# of editing this file, please use the migrations feature of Active Record to
+# incrementally modify your database, and then regenerate this schema definition.
+#
+# Note that this schema.rb definition is the authoritative source for your
+# database schema. If you need to create the application database on another
+# system, you should be using db:schema:load, not running all the migrations
+# from scratch. The latter is a flawed and unsustainable approach (the more migrations
+# you'll amass, the slower it'll run and the greater likelihood for issues).
+#
+# It's strongly recommended to check this file into your version control system.
+
+ActiveRecord::Schema.define(:version => 20120305214015) do
+
+ create_table "actions", :force => true do |t|
+ t.text "text"
+ t.string "tmpl"
+ t.integer "user_id"
+ t.integer "event_id"
+ t.integer "pool_id"
+ t.integer "game_id"
+ t.integer "tip_id"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ create_table "bonus_answers", :force => true do |t|
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ create_table "bonus_points", :force => true do |t|
+ t.integer "user_id", :null => false
+ t.integer "pool_id", :null => false
+ t.integer "round_id", :null => false
+ t.integer "round_pts", :default => 0, :null => false
+ t.integer "round_pos", :default => 0, :null => false
+ t.integer "total_pts", :default => 0, :null => false
+ t.integer "total_pos", :default => 0, :null => false
+ t.integer "diff_total_pos", :default => 0, :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "bonus_points", ["user_id", "pool_id", "round_id"], :name => "index_bonus_points_on_user_id_and_pool_id_and_round_id", :unique => true
+
+ create_table "bonus_questions", :force => true do |t|
+ t.integer "round_id", :null => false
+ t.string "title", :null => false
+ t.integer "pos", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ create_table "bonus_rounds", :force => true do |t|
+ t.integer "pool_id", :null => false
+ t.string "title", :null => false
+ t.integer "pos", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ create_table "bonus_tips", :force => true do |t|
+ t.integer "user_id", :null => false
+ t.integer "question_id", :null => false
+ t.integer "pts", :default => 0, :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ create_table "event_quotes", :force => true do |t|
+ t.integer "service_id", :null => false
+ t.integer "event_id", :null => false
+ t.integer "team_id", :null => false
+ t.decimal "odds", :null => false
+ t.string "comments"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ create_table "events", :force => true do |t|
+ t.string "title", :null => false
+ t.string "key", :null => false
+ t.boolean "team3", :default => true, :null => false
+ t.datetime "start_at", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "events", ["key"], :name => "index_events_on_key", :unique => true
+
+ create_table "events_teams", :force => true do |t|
+ t.integer "event_id", :null => false
+ t.integer "team_id", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "events_teams", ["event_id", "team_id"], :name => "index_events_teams_on_event_id_and_team_id", :unique => true
+ add_index "events_teams", ["event_id"], :name => "index_events_teams_on_event_id"
+
+ create_table "games", :force => true do |t|
+ t.integer "round_id", :null => false
+ t.integer "pos", :null => false
+ t.integer "group_id"
+ t.integer "team1_id", :null => false
+ t.integer "team2_id", :null => false
+ t.datetime "play_at", :null => false
+ t.boolean "knockout", :default => false, :null => false
+ t.boolean "home", :default => true, :null => false
+ t.boolean "locked", :default => false, :null => false
+ t.integer "score1"
+ t.integer "score2"
+ t.integer "score3"
+ t.integer "score4"
+ t.integer "score5"
+ t.integer "score6"
+ t.integer "next_game_id"
+ t.integer "prev_game_id"
+ t.string "toto12x"
+ t.string "key"
+ t.string "type"
+ t.boolean "calc", :default => false, :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "games", ["group_id"], :name => "index_games_on_group_id"
+ add_index "games", ["key"], :name => "index_games_on_key", :unique => true
+ add_index "games", ["next_game_id"], :name => "index_games_on_next_game_id"
+ add_index "games", ["prev_game_id"], :name => "index_games_on_prev_game_id"
+ add_index "games", ["round_id"], :name => "index_games_on_round_id"
+
+ create_table "group_quotes", :force => true do |t|
+ t.integer "service_id", :null => false
+ t.integer "group_id", :null => false
+ t.integer "team_id", :null => false
+ t.decimal "odds", :null => false
+ t.string "comments"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ create_table "groups", :force => true do |t|
+ t.integer "event_id", :null => false
+ t.string "title", :null => false
+ t.integer "pos", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "groups", ["event_id"], :name => "index_groups_on_event_id"
+
+ create_table "groups_teams", :force => true do |t|
+ t.integer "group_id", :null => false
+ t.integer "team_id", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "groups_teams", ["group_id", "team_id"], :name => "index_groups_teams_on_group_id_and_team_id", :unique => true
+ add_index "groups_teams", ["group_id"], :name => "index_groups_teams_on_group_id"
+
+ create_table "plays", :force => true do |t|
+ t.integer "user_id", :null => false
+ t.integer "pool_id", :null => false
+ t.integer "team1_id"
+ t.integer "team2_id"
+ t.integer "team3_id"
+ t.integer "total_pts", :default => 0, :null => false
+ t.integer "total_pos", :default => 0, :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "plays", ["pool_id"], :name => "index_plays_on_pool_id"
+ add_index "plays", ["user_id", "pool_id"], :name => "index_plays_on_user_id_and_pool_id", :unique => true
+ add_index "plays", ["user_id"], :name => "index_plays_on_user_id"
+
+ create_table "points", :force => true do |t|
+ t.integer "user_id", :null => false
+ t.integer "pool_id", :null => false
+ t.integer "round_id", :null => false
+ t.integer "round_pts", :default => 0, :null => false
+ t.integer "round_pos", :default => 0, :null => false
+ t.integer "total_pts", :default => 0, :null => false
+ t.integer "total_pos", :default => 0, :null => false
+ t.integer "diff_total_pos", :default => 0, :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "points", ["user_id", "pool_id", "round_id"], :name => "index_points_on_user_id_and_pool_id_and_round_id", :unique => true
+
+ create_table "pools", :force => true do |t|
+ t.integer "event_id", :null => false
+ t.string "title", :null => false
+ t.integer "user_id", :null => false
+ t.boolean "fix", :default => false, :null => false
+ t.boolean "public", :default => true, :null => false
+ t.boolean "locked", :default => false, :null => false
+ t.text "welcome"
+ t.text "welcome_html"
+ t.string "key"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "pools", ["event_id"], :name => "index_pools_on_event_id"
+ add_index "pools", ["key"], :name => "index_pools_on_key", :unique => true
+ add_index "pools", ["user_id"], :name => "index_pools_on_user_id"
+
+ create_table "props", :force => true do |t|
+ t.string "key", :null => false
+ t.string "value", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ create_table "quotes", :force => true do |t|
+ t.integer "service_id", :null => false
+ t.integer "game_id", :null => false
+ t.decimal "odds1", :null => false
+ t.decimal "oddsx", :null => false
+ t.decimal "odds2", :null => false
+ t.string "comments"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ create_table "rounds", :force => true do |t|
+ t.integer "event_id", :null => false
+ t.string "title", :null => false
+ t.string "title2"
+ t.integer "pos", :null => false
+ t.boolean "playoff", :default => false, :null => false
+ t.boolean "flex", :default => true, :null => false
+ t.boolean "fix", :default => true, :null => false
+ t.string "type"
+ t.boolean "calc", :default => false, :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "rounds", ["event_id"], :name => "index_rounds_on_event_id"
+
+ create_table "services", :force => true do |t|
+ t.string "title", :null => false
+ t.string "key", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ create_table "teams", :force => true do |t|
+ t.string "title", :null => false
+ t.string "title2"
+ t.string "key", :null => false
+ t.string "img"
+ t.string "tag"
+ t.string "type"
+ t.boolean "calc", :default => false, :null => false
+ t.string "calc_rule"
+ t.string "calc_value"
+ t.integer "calc_team_id"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "teams", ["key"], :name => "index_teams_on_key", :unique => true
+
+ create_table "tips", :force => true do |t|
+ t.integer "user_id", :null => false
+ t.integer "pool_id", :null => false
+ t.integer "game_id", :null => false
+ t.integer "score1"
+ t.integer "score2"
+ t.integer "score3"
+ t.integer "score4"
+ t.integer "score5"
+ t.integer "score6"
+ t.string "toto12x"
+ t.string "type"
+ t.boolean "calc", :default => false, :null => false
+ t.integer "calc_team1_id"
+ t.integer "calc_team2_id"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "tips", ["game_id"], :name => "index_tips_on_game_id"
+ add_index "tips", ["pool_id"], :name => "index_tips_on_pool_id"
+ add_index "tips", ["user_id", "pool_id", "game_id"], :name => "index_tips_on_user_id_and_pool_id_and_game_id", :unique => true
+ add_index "tips", ["user_id"], :name => "index_tips_on_user_id"
+
+ create_table "users", :force => true do |t|
+ t.string "name", :null => false
+ t.string "email", :null => false
+ t.string "password_digest"
+ t.string "key", :null => false
+ t.boolean "admin", :default => false, :null => false
+ t.boolean "guest", :default => false, :null => false
+ t.boolean "active", :default => true, :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ add_index "users", ["email"], :name => "index_users_on_email", :unique => true
+ add_index "users", ["key"], :name => "index_users_on_key", :unique => true
+
+end
View
83 db/seeds/austria/bl_2012_13_quotes.rb
@@ -0,0 +1,83 @@
+# encoding: utf-8
+
+####################################################
+## Oesterreichische Bundesliga 2012/13 Quotes/Odds
+
+
+bl = Event.find_by_key!( 'at_bl_2012_13' )
+
+
+salzburg = Team.find_by_key!( 'salzburg' )
+rapid = Team.find_by_key!( 'rapid' )
+admira = Team.find_by_key!( 'admira' )
+austria = Team.find_by_key!( 'austria' )
+sturm = Team.find_by_key!( 'sturm' )
+ried = Team.find_by_key!( 'ried' )
+wacker = Team.find_by_key!( 'wacker' )
+mattersburg = Team.find_by_key!( 'mattersburg' )
+neustadt = Team.find_by_key!( 'neustadt' )
+wac = Team.find_by_key!( 'wac' )
+
+
+bl11 = Round.find_by_event_id_and_pos!( bl.id, 11 )
+
+
+tipp3 = Service.find_by_key!( 'tipp3' )
+betathome = Service.find_by_key!( 'betathome' )
+
+
+tipp3_winner_odds = [
+ [ salzburg, 1.55 ],
+ [ rapid, 4 ],
+ [ austria, 4 ],
+ [ sturm, 15 ],
+ [ admira, 30 ],
+ [ ried, 75 ],
+ [ mattersburg, 150 ],
+ [ wac, 200 ],
+ [ neustadt, 700 ],
+ [ wacker, 850 ]]
+
+betathome_winner_odds = [
+ [ salzburg, 1.65 ],
+ [ rapid, 3.9 ],
+ [ austria, 3.9 ],
+ [ sturm, 17 ],
+ [ ried, 50 ],
+ [ wac, 70 ],
+ [ admira, 75 ],
+ [ mattersburg, 100 ],
+ [ neustadt, 250 ],
+ [ wacker, 350 ]]
+
+
+EventQuote.create_from_ary!( tipp3_winner_odds, tipp3, bl )
+EventQuote.create_from_ary!( betathome_winner_odds, betathome, bl )
+
+
+
+games_bl11_tipp3_odds = [
+ [ wac, ried, 2.2, 3, 2.6 ],
+ [ rapid, neustadt, 1.2, 4.7, 8.6 ],
+ [ mattersburg, salzburg, 3.7, 3.1, 1.75 ],
+ [ sturm, austria, 2.4, 2.9, 2.5 ],
+ [ admira, wacker, 1.4, 3.7, 5.7 ]
+]
+
+games_bl11_betathome_odds = [
+ [ wac, ried, 2.4, 3.25, 2.7 ],
+ [ rapid, neustadt, 1.25, 5.5, 9 ],
+ [ mattersburg, salzburg, 3.95, 3.35, 1.85 ],
+ [ sturm, austria, 2.5, 3.1, 2.7 ],
+ [ admira, wacker, 1.45, 4.3, 5.9 ]
+]
+
+Quote.create_from_ary_for_round!( games_bl11_tipp3_odds, tipp3, bl11 )
+Quote.create_from_ary_for_round!( games_bl11_betathome_odds, betathome, bl11 )
+
+
+
+
+
+## todo: use new version constant for app module e.g. Wettpool::VERSION ??
+Prop.create!( :key => 'db.seeds.austria.bl.2012/13.quotes.version', :value => '1' )
View
59 db/seeds/austria/cup_2012_13.rb
@@ -181,55 +181,20 @@
[ 16, gak, [0,6], wac, Time.cet('2012-09-26 20:20') ]
]
-Game.create_knockouts_from_ary!( games_cuprunde1, cuprunde1 )
-Game.create_knockouts_from_ary!( games_cuprunde2, cuprunde2 )
-
-
-
+games_cup16 = [
+ [ 1, lask, [], mattersburg, Time.cet('2012-10-30 00:00') ],
+ [ 2, rapid, [], altach, Time.cet('2012-10-30 00:00') ],
+ [ 3, viktoria, [], ried, Time.cet('2012-10-30 00:00') ],
+ [ 4, sturm, [], wacker, Time.cet('2012-10-30 00:00') ],
+ [ 5, pasching, [], austriak, Time.cet('2012-10-30 00:00') ],
+ [ 6, lustenau, [], wac, Time.cet('2012-10-30 00:00') ],
+ [ 7, kalsdorf, [], salzburg, Time.cet('2012-10-30 00:00') ],
+ [ 8, vsv, [], austria, Time.cet('2012-10-30 00:00') ]]
-tipp3 = Service.find_by_key!( 'tipp3' )
-betathome = Service.find_by_key!( 'betathome' )
-
-cuprunde2_tipp3_odds = [
- [ kalsdorf, hartberg, 2.7, 2.9, 2.1 ],
- [ viktoria, ksv, 6.8, 4.5, 1.2 ],
- [ hard, altach, 6.8, 4.5, 1.2 ],
- [ stegersbach, salzburg, 12, 6, 1.05 ],
- [ pasching, austrial, 3.8, 3.4, 1.55 ],
- [ austriak, admira, 6.8, 4.5, 1.2 ],
- [ schwechat, sturm, 9, 5.5, 1.1 ],
- [ lask, groedig, 3.1, 3, 1.85 ],
- [ stjohann, lustenau, 4.6, 3.4, 1.45 ],
- [ sollenau, wacker, 6.5, 4, 1.25 ],
- [ vsv, neustadt, 5.8, 3.8, 1.3 ],
- [ dornbirn, austria, 9, 5.5, 1.1 ],
- [ badvoeslau, mattersburg, 7.5, 5, 1.15 ],
- [ stflorian, ried, 6.8, 4.5, 1.2 ],
- [ allerheiligen, rapid, 12, 6, 1.05 ],
- [ gak, wac, 5.8, 3.8, 1.3 ]
-]
-
-cuprunde2_betathome_odds = [
- [ kalsdorf, hartberg, 3.1, 3.2, 2.05 ],
- [ viktoria, ksv, 7.5, 5.2, 1.25 ],
- [ hard, altach, 8.5, 5.8, 1.2 ],
- [ stegersbach, salzburg, 13, 11, 1.05 ],
- [ pasching, austrial, 4.3, 3.75, 1.6 ],
- [ austriak, admira, 7, 5.5, 1.25 ],
- [ schwechat, sturm, 13, 7.2, 1.1 ],
- [ lask, groedig, 3.6, 3.3, 1.85 ],
- [ stjohann, lustenau, 4.75, 3.75, 1.55 ],
- [ sollenau, wacker, 9, 5.5, 1.2 ],
- [ vsv, neustadt, 6.5, 5, 1.3 ],
- [ dornbirn, austria, 13, 7.2, 1.1 ],
- [ badvoeslau, mattersburg, 13, 7.2, 1.1 ],
- [ stflorian, ried, 11, 6.2, 1.15 ],
- [ allerheiligen, rapid, 13, 11, 1.05 ],
- [ gak, wac, 7.2, 4.5, 1.3 ]
-]
-Quote.create_from_ary_for_round!( cuprunde2_tipp3_odds, tipp3, cuprunde2 )
-Quote.create_from_ary_for_round!( cuprunde2_betathome_odds, betathome, cuprunde2 )
+Game.create_knockouts_from_ary!( games_cuprunde1, cuprunde1 )
+Game.create_knockouts_from_ary!( games_cuprunde2, cuprunde2 )
+Game.create_knockouts_from_ary!( games_cup16, cup16 )
## todo: use new version constant for app module e.g. Wettpool::VERSION ??
View
88 db/seeds/austria/cup_2012_13_2.rb
@@ -5,6 +5,10 @@
puts "*** loading seed data in seeds/austria/cup_2012_13_2.rb"
+cup = Event.find_by_key!( 'at_cup_2012_13' )
+
+bl = Event.find_by_key!( 'at_bl_2012_13' )
+
lask = Team.find_by_key!( 'lask' )
mattersburg = Team.find_by_key!( 'mattersburg' )
@@ -34,100 +38,16 @@
groedig = Team.find_by_key!( 'groedig' )
-cup = Event.find_by_key!( 'at_cup_2012_13' )
-bl = Event.find_by_key!( 'at_bl_2012_13' )
tipp3 = Service.find_by_key!( 'tipp3' )
betathome = Service.find_by_key!( 'betathome' )
-tipp3_winner_odds = [
- [ salzburg, 1.55 ],
- [ rapid, 4 ],
- [ austria, 4 ],
- [ sturm, 15 ],
- [ admira, 30 ],
- [ ried, 75 ],
- [ mattersburg, 150 ],
- [ wac, 200 ],
- [ neustadt, 700 ],
- [ wacker, 850 ]]
-
-betathome_winner_odds = [
- [ salzburg, 1.65 ],
- [ rapid, 3.9 ],
- [ austria, 3.9 ],
- [ sturm, 17 ],
- [ ried, 50 ],
- [ wac, 70 ],
- [ admira, 75 ],
- [ mattersburg, 100 ],
- [ neustadt, 250 ],
- [ wacker, 350 ]]
-
-
-EventQuote.create_from_ary!( tipp3_winner_odds, tipp3, bl )
-EventQuote.create_from_ary!( betathome_winner_odds, betathome, bl )
-
-bl11 = Round.find_by_event_id_and_pos!( bl.id, 11 )
-
-games_bl11_tipp3_odds = [
- [ wac, ried, 2.2, 3, 2.6 ],
- [ rapid, neustadt, 1.2, 4.7, 8.6 ],
- [ mattersburg, salzburg, 3.7, 3.1, 1.75 ],
- [ sturm, austria, 2.4, 2.9, 2.5 ],
- [ admira, wacker, 1.4, 3.7, 5.7 ]
-]
-
-games_bl11_betathome_odds = [
- [ wac, ried, 2.4, 3.25, 2.7 ],
- [ rapid, neustadt, 1.25, 5.5, 9 ],
- [ mattersburg, salzburg, 3.95, 3.35, 1.85 ],
- [ sturm, austria, 2.5, 3.1, 2.7 ],
- [ admira, wacker, 1.45, 4.3, 5.9 ]
-]
-
-Quote.create_from_ary_for_round!( games_bl11_tipp3_odds, tipp3, bl11 )
-Quote.create_from_ary_for_round!( games_bl11_betathome_odds, betathome, bl11 )
-
-
-
-tipp3_cup_winner_odds = [
- [ salzburg, 3 ],
- [ rapid, 4 ],
- [ austria, 4 ],
- [ sturm, 8 ],
- [ admira, 10 ],
- [ ried, 12 ],
- [ wac, 20 ],
- [ mattersburg, 20 ],
- [ neustadt, 25 ],
- [ wacker, 25 ],
- [ austrial, 25 ],
- [ altach, 30 ],
- [ groedig, 30 ],
- [ ksv, 40 ],
- [ lustenau, 50 ]]
-
-EventQuote.create_from_ary!( tipp3_cup_winner_odds, tipp3, cup )
-
cup16 = Round.find_by_event_id_and_pos!( cup.id, 3 )
-games_cup16 = [
- [ 1, lask, [], mattersburg, Time.cet('2012-10-30 00:00') ],
- [ 2, rapid, [], altach, Time.cet('2012-10-30 00:00') ],
- [ 3, viktoria, [], ried, Time.cet('2012-10-30 00:00') ],
- [ 4, sturm, [], wacker, Time.cet('2012-10-30 00:00') ],
- [ 5, pasching, [], austriak, Time.cet('2012-10-30 00:00') ],
- [ 6, lustenau, [], wac, Time.cet('2012-10-30 00:00') ],
- [ 7, kalsdorf, [], salzburg, Time.cet('2012-10-30 00:00') ],
- [ 8, vsv, [], austria, Time.cet('2012-10-30 00:00') ]]
-
-Game.create_knockouts_from_ary!( games_cup16, cup16 )
-
## todo: use new version constant for app module e.g. Wettpool::VERSION ??
View
165 db/seeds/austria/cup_2012_13_quotes.rb
@@ -0,0 +1,165 @@
+# encoding: utf-8
+
+##################################
+### ÖFB Cup 2012/13 Quotes/Odds
+
+cup = Event.find_by_key!( 'at_cup_2012_13' )
+
+
+## bundesliga teams
+
+salzburg = Team.find_by_key!( 'salzburg' )
+rapid = Team.find_by_key!( 'rapid' )
+admira = Team.find_by_key!( 'admira' )
+austria = Team.find_by_key!( 'austria' )
+sturm = Team.find_by_key!( 'sturm' )
+ried = Team.find_by_key!( 'ried' )
+wacker = Team.find_by_key!( 'wacker' )
+mattersburg = Team.find_by_key!( 'mattersburg' )
+neustadt = Team.find_by_key!( 'neustadt' )
+wac = Team.find_by_key!( 'wac' )
+
+## erste liga teams
+
+ksv = Team.find_by_key!( 'ksv' )
+altach = Team.find_by_key!( 'altach' )
+austrial = Team.find_by_key!( 'austrial' )
+stpoelten = Team.find_by_key!( 'stpoelten' )
+linz = Team.find_by_key!( 'linz' )
+groedig = Team.find_by_key!( 'groedig' )
+lustenau = Team.find_by_key!( 'lustenau' )
+vienna = Team.find_by_key!( 'vienna' )
+hartberg = Team.find_by_key!( 'hartberg' )
+horn = Team.find_by_key!( 'horn' )
+
+## regionalliga west teams
+
+hard = Team.find_by_key!( 'hard' )
+bregenz = Team.find_by_key!( 'bregenz' )
+dornbirn = Team.find_by_key!( 'dornbirn' )
+kufstein = Team.find_by_key!( 'kufstein' )
+wattens = Team.find_by_key!( 'wattens' )
+austrias = Team.find_by_key!( 'austrias')
+pinzgau = Team.find_by_key!( 'pinzgau' )
+stjohann = Team.find_by_key!( 'stjohann' )
+
+## regionalliga mitte teams
+
+vsv = Team.find_by_key!( 'vsv' )
+klagenfurt = Team.find_by_key!( 'klagenfurt' )
+austriak = Team.find_by_key!( 'austriak' )
+kalsdorf = Team.find_by_key!( 'kalsdorf' )
+gratkorn = Team.find_by_key!( 'gratkorn' )
+allerheiligen = Team.find_by_key!( 'allerheiligen' )
+leoben = Team.find_by_key!( 'leoben' )
+gak = Team.find_by_key!( 'gak' )
+pasching = Team.find_by_key!( 'pasching' )
+voecklamarkt = Team.find_by_key!( 'voecklamarkt' )
+stflorian = Team.find_by_key!( 'stflorian' )
+wallern = Team.find_by_key!( 'wallern' )
+lask = Team.find_by_key!( 'lask' )
+
+## regionalliga ost teams
+
+sollenau = Team.find_by_key!( 'sollenau' )
+amstetten = Team.find_by_key!( 'amstetten' )
+retz = Team.find_by_key!( 'retz' )
+fac = Team.find_by_key!( 'fac' )
+schwechat = Team.find_by_key!( 'schwechat' )
+wienersk = Team.find_by_key!( 'wienersk' )
+ostbahn = Team.find_by_key!( 'ostbahn' )
+oberwart = Team.find_by_key!( 'oberwart' )
+parndorf = Team.find_by_key!( 'parndorf' )
+stegersbach = Team.find_by_key!( 'stegersbach' )
+
+## noch einige teams
+
+wolfurt = Team.find_by_key!( 'wolfurt' )
+schwaz = Team.find_by_key!( 'schwaz' )
+reutte = Team.find_by_key!( 'reutte' )
+spittal = Team.find_by_key!( 'spittal' )
+sak = Team.find_by_key!( 'sak' )
+dsc = Team.find_by_key!( 'dsc' )
+micheldorf = Team.find_by_key!( 'micheldorf' )
+badvoeslau = Team.find_by_key!( 'badvoeslau' )
+gaflenz = Team.find_by_key!( 'gaflenz' )
+ardagger = Team.find_by_key!( 'ardagger' )
+rohrendorf = Team.find_by_key!( 'rohrendorf' )
+heiligenkreuz = Team.find_by_key!( 'heiligenkreuz' )
+viktoria = Team.find_by_key!( 'viktoria' )
+
+
+cuprunde2 = Round.find_by_event_id_and_pos!( cup.id, 2 )
+
+
+tipp3 = Service.find_by_key!( 'tipp3' )
+betathome = Service.find_by_key!( 'betathome' )
+
+
+tipp3_cup_winner_odds = [
+ [ salzburg, 3 ],
+ [ rapid, 4 ],
+ [ austria, 4 ],
+ [ sturm, 8 ],
+ [ admira, 10 ],
+ [ ried, 12 ],
+ [ wac, 20 ],
+ [ mattersburg, 20 ],
+ [ neustadt, 25 ],
+ [ wacker, 25 ],
+ [ austrial, 25 ],
+ [ altach, 30 ],
+ [ groedig, 30 ],
+ [ ksv, 40 ],
+ [ lustenau, 50 ]]
+
+EventQuote.create_from_ary!( tipp3_cup_winner_odds, tipp3, cup )
+
+
+
+cuprunde2_tipp3_odds = [
+ [ kalsdorf, hartberg, 2.7, 2.9, 2.1 ],
+ [ viktoria, ksv, 6.8, 4.5, 1.2 ],
+ [ hard, altach, 6.8, 4.5, 1.2 ],
+ [ stegersbach, salzburg, 12, 6, 1.05 ],
+ [ pasching, austrial, 3.8, 3.4, 1.55 ],
+ [ austriak, admira, 6.8, 4.5, 1.2 ],
+ [ schwechat, sturm, 9, 5.5, 1.1 ],
+ [ lask, groedig, 3.1, 3, 1.85 ],
+ [ stjohann, lustenau, 4.6, 3.4, 1.45 ],
+ [ sollenau, wacker, 6.5, 4, 1.25 ],
+ [ vsv, neustadt, 5.8, 3.8, 1.3 ],
+ [ dornbirn, austria, 9, 5.5, 1.1 ],
+ [ badvoeslau, mattersburg, 7.5, 5, 1.15 ],
+ [ stflorian, ried, 6.8, 4.5, 1.2 ],
+ [ allerheiligen, rapid, 12, 6, 1.05 ],
+ [ gak, wac, 5.8, 3.8, 1.3 ]
+]
+
+cuprunde2_betathome_odds = [
+ [ kalsdorf, hartberg, 3.1, 3.2, 2.05 ],
+ [ viktoria, ksv, 7.5, 5.2, 1.25 ],
+ [ hard, altach, 8.5, 5.8, 1.2 ],
+ [ stegersbach, salzburg, 13, 11, 1.05 ],
+ [ pasching, austrial, 4.3, 3.75, 1.6 ],
+ [ austriak, admira, 7, 5.5, 1.25 ],
+ [ schwechat, sturm, 13, 7.2, 1.1 ],
+ [ lask, groedig, 3.6, 3.3, 1.85 ],
+ [ stjohann, lustenau, 4.75, 3.75, 1.55 ],
+ [ sollenau, wacker, 9, 5.5, 1.2 ],
+ [ vsv, neustadt, 6.5, 5, 1.3 ],
+ [ dornbirn, austria, 13, 7.2, 1.1 ],
+ [ badvoeslau, mattersburg, 13, 7.2, 1.1 ],
+ [ stflorian, ried, 11, 6.2, 1.15 ],
+ [ allerheiligen, rapid, 13, 11, 1.05 ],
+ [ gak, wac, 7.2, 4.5, 1.3 ]
+]
+
+Quote.create_from_ary_for_round!( cuprunde2_tipp3_odds, tipp3, cuprunde2 )
+Quote.create_from_ary_for_round!( cuprunde2_betathome_odds, betathome, cuprunde2 )
+
+
+
+
+## todo: use new version constant for app module e.g. Wettpool::VERSION ??
+Prop.create!( :key => 'db.seeds.austria.cup.2012/13.quotes.version', :value => '1' )
View
5 lib/tasks/load_uss_others.rake
@@ -3,10 +3,13 @@ desc "wettpool: load seed data for uss other pools"
task :load_uss_others => [:environment] do |t|
['services',
- 'austria/teams', 'austria/bl_2012_13', 'austria/cup_2012_13',
+ 'austria/teams',
+ 'austria/bl_2012_13', 'austria/bl_2012_13_quotes',
+ 'austria/cup_2012_13', 'austria/cup_2012_13_quotes',
'euro/teams', 'world/quali_2012_13',
'cl/teams', 'cl/cl_2012_13',
'uss/users', 'uss/others_pools' ].each do |seed|
+ puts "*** loading seed data in '#{seed}'..."
require "#{Rails.root}/db/seeds/#{seed}.rb"
end
Please sign in to comment.
Something went wrong with that request. Please try again.