diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20140304014838_create_servers.rb (renamed from db/migrate/20140304014808_create_servers.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140304014840_create_tournaments.rb (renamed from db/migrate/20140304014810_create_tournaments.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140304014842_create_matches.rb (renamed from db/migrate/20140304014812_create_matches.rb) | 2 | ||||
-rw-r--r-- | db/migrate/20140304014844_create_teams.rb (renamed from db/migrate/20140304014814_create_teams.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140304014846_create_users.rb (renamed from db/migrate/20140304014816_create_users.rb) | 4 | ||||
-rw-r--r-- | db/migrate/20140304014848_create_user_team_pairs.rb (renamed from db/migrate/20140304014819_create_user_team_pairs.rb) | 4 | ||||
-rw-r--r-- | db/migrate/20140304014850_create_team_match_pairs.rb (renamed from db/migrate/20140304014821_create_team_match_pairs.rb) | 4 | ||||
-rw-r--r-- | db/migrate/20140304014852_create_alerts.rb (renamed from db/migrate/20140304014823_create_alerts.rb) | 2 | ||||
-rw-r--r-- | db/migrate/20140304014855_create_pms.rb (renamed from db/migrate/20140304014825_create_pms.rb) | 4 | ||||
-rw-r--r-- | db/migrate/20140304014857_create_server_settings.rb (renamed from db/migrate/20140304014827_create_server_settings.rb) | 0 | ||||
-rw-r--r-- | db/schema.rb | 92 |
11 files changed, 102 insertions, 10 deletions
diff --git a/db/migrate/20140304014808_create_servers.rb b/db/migrate/20140304014838_create_servers.rb index f33241a..f33241a 100644 --- a/db/migrate/20140304014808_create_servers.rb +++ b/db/migrate/20140304014838_create_servers.rb diff --git a/db/migrate/20140304014810_create_tournaments.rb b/db/migrate/20140304014840_create_tournaments.rb index 2095590..2095590 100644 --- a/db/migrate/20140304014810_create_tournaments.rb +++ b/db/migrate/20140304014840_create_tournaments.rb diff --git a/db/migrate/20140304014812_create_matches.rb b/db/migrate/20140304014842_create_matches.rb index 288ce6a..6c0c157 100644 --- a/db/migrate/20140304014812_create_matches.rb +++ b/db/migrate/20140304014842_create_matches.rb @@ -1,7 +1,7 @@ class CreateMatches < ActiveRecord::Migration def change create_table :matches do |t| - t.reference :tournament + t.references :tournament, index: true t.timestamps end diff --git a/db/migrate/20140304014814_create_teams.rb b/db/migrate/20140304014844_create_teams.rb index dd8397d..dd8397d 100644 --- a/db/migrate/20140304014814_create_teams.rb +++ b/db/migrate/20140304014844_create_teams.rb diff --git a/db/migrate/20140304014816_create_users.rb b/db/migrate/20140304014846_create_users.rb index 3723908..6a500e5 100644 --- a/db/migrate/20140304014816_create_users.rb +++ b/db/migrate/20140304014846_create_users.rb @@ -2,8 +2,8 @@ class CreateUsers < ActiveRecord::Migration def change create_table :users do |t| t.text :name - t.varchar :pw_hash - t.int :groups + t.text :pw_hash + t.integer :groups t.timestamps end diff --git a/db/migrate/20140304014819_create_user_team_pairs.rb b/db/migrate/20140304014848_create_user_team_pairs.rb index 3b60212..2c492ac 100644 --- a/db/migrate/20140304014819_create_user_team_pairs.rb +++ b/db/migrate/20140304014848_create_user_team_pairs.rb @@ -1,8 +1,8 @@ class CreateUserTeamPairs < ActiveRecord::Migration def change create_table :user_team_pairs do |t| - t.reference :user - t.reference :team + t.references :user, index: true + t.references :team, index: true t.timestamps end diff --git a/db/migrate/20140304014821_create_team_match_pairs.rb b/db/migrate/20140304014850_create_team_match_pairs.rb index c489495..8fac07e 100644 --- a/db/migrate/20140304014821_create_team_match_pairs.rb +++ b/db/migrate/20140304014850_create_team_match_pairs.rb @@ -1,8 +1,8 @@ class CreateTeamMatchPairs < ActiveRecord::Migration def change create_table :team_match_pairs do |t| - t.reference :team - t.reference :match + t.references :team, index: true + t.references :match, index: true t.timestamps end diff --git a/db/migrate/20140304014823_create_alerts.rb b/db/migrate/20140304014852_create_alerts.rb index 6167f33..68a8e10 100644 --- a/db/migrate/20140304014823_create_alerts.rb +++ b/db/migrate/20140304014852_create_alerts.rb @@ -1,7 +1,7 @@ class CreateAlerts < ActiveRecord::Migration def change create_table :alerts do |t| - t.reference :author + t.references :author, index: true t.text :message t.timestamps diff --git a/db/migrate/20140304014825_create_pms.rb b/db/migrate/20140304014855_create_pms.rb index f3b27fb..93bb5c6 100644 --- a/db/migrate/20140304014825_create_pms.rb +++ b/db/migrate/20140304014855_create_pms.rb @@ -1,8 +1,8 @@ class CreatePms < ActiveRecord::Migration def change create_table :pms do |t| - t.reference :author - t.reference :recipient + t.references :author, index: true + t.references :recipient, index: true t.text :message t.timestamps diff --git a/db/migrate/20140304014827_create_server_settings.rb b/db/migrate/20140304014857_create_server_settings.rb index dfdd91b..dfdd91b 100644 --- a/db/migrate/20140304014827_create_server_settings.rb +++ b/db/migrate/20140304014857_create_server_settings.rb diff --git a/db/schema.rb b/db/schema.rb new file mode 100644 index 0000000..88dfa1a --- /dev/null +++ b/db/schema.rb @@ -0,0 +1,92 @@ +# 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 that you check this file into your version control system. + +ActiveRecord::Schema.define(version: 20140304014857) do + + create_table "alerts", force: true do |t| + t.integer "author_id" + t.text "message" + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "alerts", ["author_id"], name: "index_alerts_on_author_id" + + create_table "matches", force: true do |t| + t.integer "tournament_id" + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "matches", ["tournament_id"], name: "index_matches_on_tournament_id" + + create_table "pms", force: true do |t| + t.integer "author_id" + t.integer "recipient_id" + t.text "message" + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "pms", ["author_id"], name: "index_pms_on_author_id" + add_index "pms", ["recipient_id"], name: "index_pms_on_recipient_id" + + create_table "server_settings", force: true do |t| + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "servers", force: true do |t| + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "team_match_pairs", force: true do |t| + t.integer "team_id" + t.integer "match_id" + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "team_match_pairs", ["match_id"], name: "index_team_match_pairs_on_match_id" + add_index "team_match_pairs", ["team_id"], name: "index_team_match_pairs_on_team_id" + + create_table "teams", force: true do |t| + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "tournaments", force: true do |t| + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "user_team_pairs", force: true do |t| + t.integer "user_id" + t.integer "team_id" + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "user_team_pairs", ["team_id"], name: "index_user_team_pairs_on_team_id" + add_index "user_team_pairs", ["user_id"], name: "index_user_team_pairs_on_user_id" + + create_table "users", force: true do |t| + t.text "name" + t.text "pw_hash" + t.integer "groups" + t.datetime "created_at" + t.datetime "updated_at" + end + +end |