summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20140304015246_create_servers.rb (renamed from db/migrate/20140304014908_create_servers.rb)0
-rw-r--r--db/migrate/20140304015248_create_tournaments.rb (renamed from db/migrate/20140304014910_create_tournaments.rb)1
-rw-r--r--db/migrate/20140304015250_create_matches.rb (renamed from db/migrate/20140304014913_create_matches.rb)0
-rw-r--r--db/migrate/20140304015252_create_teams.rb (renamed from db/migrate/20140304014915_create_teams.rb)0
-rw-r--r--db/migrate/20140304015254_create_users.rb (renamed from db/migrate/20140304014917_create_users.rb)0
-rw-r--r--db/migrate/20140304015257_create_user_team_pairs.rb (renamed from db/migrate/20140304014919_create_user_team_pairs.rb)0
-rw-r--r--db/migrate/20140304015259_create_team_match_pairs.rb (renamed from db/migrate/20140304014921_create_team_match_pairs.rb)0
-rw-r--r--db/migrate/20140304015301_create_alerts.rb (renamed from db/migrate/20140304014923_create_alerts.rb)0
-rw-r--r--db/migrate/20140304015303_create_pms.rb (renamed from db/migrate/20140304014926_create_pms.rb)0
-rw-r--r--db/migrate/20140304015306_create_games.rb13
-rw-r--r--db/migrate/20140304015308_create_game_attributes.rb11
-rw-r--r--db/migrate/20140304015310_create_server_settings.rb (renamed from db/migrate/20140304014928_create_server_settings.rb)0
-rw-r--r--db/migrate/20140304015316_create_tournament_options.rb8
-rw-r--r--db/schema.rb30
14 files changed, 62 insertions, 1 deletions
diff --git a/db/migrate/20140304014908_create_servers.rb b/db/migrate/20140304015246_create_servers.rb
index f33241a..f33241a 100644
--- a/db/migrate/20140304014908_create_servers.rb
+++ b/db/migrate/20140304015246_create_servers.rb
diff --git a/db/migrate/20140304014910_create_tournaments.rb b/db/migrate/20140304015248_create_tournaments.rb
index 2095590..36fcf7e 100644
--- a/db/migrate/20140304014910_create_tournaments.rb
+++ b/db/migrate/20140304015248_create_tournaments.rb
@@ -1,6 +1,7 @@
class CreateTournaments < ActiveRecord::Migration
def change
create_table :tournaments do |t|
+ t.references :game, index: true
t.timestamps
end
diff --git a/db/migrate/20140304014913_create_matches.rb b/db/migrate/20140304015250_create_matches.rb
index 6c0c157..6c0c157 100644
--- a/db/migrate/20140304014913_create_matches.rb
+++ b/db/migrate/20140304015250_create_matches.rb
diff --git a/db/migrate/20140304014915_create_teams.rb b/db/migrate/20140304015252_create_teams.rb
index dd8397d..dd8397d 100644
--- a/db/migrate/20140304014915_create_teams.rb
+++ b/db/migrate/20140304015252_create_teams.rb
diff --git a/db/migrate/20140304014917_create_users.rb b/db/migrate/20140304015254_create_users.rb
index 6a500e5..6a500e5 100644
--- a/db/migrate/20140304014917_create_users.rb
+++ b/db/migrate/20140304015254_create_users.rb
diff --git a/db/migrate/20140304014919_create_user_team_pairs.rb b/db/migrate/20140304015257_create_user_team_pairs.rb
index 2c492ac..2c492ac 100644
--- a/db/migrate/20140304014919_create_user_team_pairs.rb
+++ b/db/migrate/20140304015257_create_user_team_pairs.rb
diff --git a/db/migrate/20140304014921_create_team_match_pairs.rb b/db/migrate/20140304015259_create_team_match_pairs.rb
index 8fac07e..8fac07e 100644
--- a/db/migrate/20140304014921_create_team_match_pairs.rb
+++ b/db/migrate/20140304015259_create_team_match_pairs.rb
diff --git a/db/migrate/20140304014923_create_alerts.rb b/db/migrate/20140304015301_create_alerts.rb
index 68a8e10..68a8e10 100644
--- a/db/migrate/20140304014923_create_alerts.rb
+++ b/db/migrate/20140304015301_create_alerts.rb
diff --git a/db/migrate/20140304014926_create_pms.rb b/db/migrate/20140304015303_create_pms.rb
index 93bb5c6..93bb5c6 100644
--- a/db/migrate/20140304014926_create_pms.rb
+++ b/db/migrate/20140304015303_create_pms.rb
diff --git a/db/migrate/20140304015306_create_games.rb b/db/migrate/20140304015306_create_games.rb
new file mode 100644
index 0000000..59d4ef0
--- /dev/null
+++ b/db/migrate/20140304015306_create_games.rb
@@ -0,0 +1,13 @@
+class CreateGames < ActiveRecord::Migration
+ def change
+ create_table :games do |t|
+ t.text :name
+ t.integer :players_per_team
+ t.integer :teams_per_match
+ t.integer :set_rounds
+ t.integer :randomized_teams
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20140304015308_create_game_attributes.rb b/db/migrate/20140304015308_create_game_attributes.rb
new file mode 100644
index 0000000..b63f134
--- /dev/null
+++ b/db/migrate/20140304015308_create_game_attributes.rb
@@ -0,0 +1,11 @@
+class CreateGameAttributes < ActiveRecord::Migration
+ def change
+ create_table :game_attributes do |t|
+ t.references :game, index: true
+ t.text :key
+ t.integer :type
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20140304014928_create_server_settings.rb b/db/migrate/20140304015310_create_server_settings.rb
index dfdd91b..dfdd91b 100644
--- a/db/migrate/20140304014928_create_server_settings.rb
+++ b/db/migrate/20140304015310_create_server_settings.rb
diff --git a/db/migrate/20140304015316_create_tournament_options.rb b/db/migrate/20140304015316_create_tournament_options.rb
new file mode 100644
index 0000000..d2df22e
--- /dev/null
+++ b/db/migrate/20140304015316_create_tournament_options.rb
@@ -0,0 +1,8 @@
+class CreateTournamentOptions < ActiveRecord::Migration
+ def change
+ create_table :tournament_options do |t|
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 5d839f4..264a347 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20140304014928) do
+ActiveRecord::Schema.define(version: 20140304015316) do
create_table "alerts", force: true do |t|
t.integer "author_id"
@@ -22,6 +22,26 @@ ActiveRecord::Schema.define(version: 20140304014928) do
add_index "alerts", ["author_id"], name: "index_alerts_on_author_id"
+ create_table "game_attributes", force: true do |t|
+ t.integer "game_id"
+ t.text "key"
+ t.integer "type"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "game_attributes", ["game_id"], name: "index_game_attributes_on_game_id"
+
+ create_table "games", force: true do |t|
+ t.text "name"
+ t.integer "players_per_team"
+ t.integer "teams_per_match"
+ t.integer "set_rounds"
+ t.integer "randomized_teams"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
create_table "matches", force: true do |t|
t.integer "tournament_id"
t.datetime "created_at"
@@ -66,11 +86,19 @@ ActiveRecord::Schema.define(version: 20140304014928) do
t.datetime "updated_at"
end
+ create_table "tournament_options", force: true do |t|
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
create_table "tournaments", force: true do |t|
+ t.integer "game_id"
t.datetime "created_at"
t.datetime "updated_at"
end
+ add_index "tournaments", ["game_id"], name: "index_tournaments_on_game_id"
+
create_table "user_team_pairs", force: true do |t|
t.integer "user_id"
t.integer "team_id"