summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20140422021622_create_simple_captcha_data.rb (renamed from db/migrate/20140421103137_create_simple_captcha_data.rb)0
-rw-r--r--db/migrate/20140422061625_create_delayed_jobs.rb (renamed from db/migrate/20140421143140_create_delayed_jobs.rb)0
-rw-r--r--db/migrate/20140422061628_create_servers.rb (renamed from db/migrate/20140421143143_create_servers.rb)0
-rw-r--r--db/migrate/20140422061631_create_matches.rb (renamed from db/migrate/20140421143146_create_matches.rb)2
-rw-r--r--db/migrate/20140422061633_create_teams.rb (renamed from db/migrate/20140421143149_create_teams.rb)0
-rw-r--r--db/migrate/20140422061636_create_alerts.rb (renamed from db/migrate/20140421143152_create_alerts.rb)0
-rw-r--r--db/migrate/20140422061639_create_pms.rb (renamed from db/migrate/20140421143155_create_pms.rb)0
-rw-r--r--db/migrate/20140422061642_create_tournaments.rb (renamed from db/migrate/20140421143158_create_tournaments.rb)4
-rw-r--r--db/migrate/20140422061645_create_games.rb (renamed from db/migrate/20140421143201_create_games.rb)4
-rw-r--r--db/migrate/20140422061648_create_users.rb (renamed from db/migrate/20140421143204_create_users.rb)0
-rw-r--r--db/migrate/20140422061651_create_sessions.rb (renamed from db/migrate/20140421143207_create_sessions.rb)0
-rw-r--r--db/migrate/20140422061654_create_brackets.rb (renamed from db/migrate/20140421143210_create_brackets.rb)0
-rw-r--r--db/migrate/20140422061657_create_game_settings.rb (renamed from db/migrate/20140421143213_create_game_settings.rb)0
-rw-r--r--db/migrate/20140422061700_create_tournament_settings.rb (renamed from db/migrate/20140421143216_create_tournament_settings.rb)0
-rw-r--r--db/migrate/20140422061703_create_tournament_stages.rb11
-rw-r--r--db/migrate/20140422061706_create_statistics.rb (renamed from db/migrate/20140421143219_create_scores.rb)5
-rw-r--r--db/migrate/20140422061709_create_remote_usernames.rb (renamed from db/migrate/20140421143222_create_remote_usernames.rb)0
-rw-r--r--db/migrate/20140422061712_create_bracket_matches.rb (renamed from db/migrate/20140421143225_create_bracket_matches.rb)0
-rw-r--r--db/migrate/20140422061715_create_api_requests.rb (renamed from db/migrate/20140421143228_create_api_requests.rb)0
-rw-r--r--db/migrate/20140422061718_create_tournament_players_join_table.rb (renamed from db/migrate/20140421143231_create_tournament_players_join_table.rb)0
-rw-r--r--db/migrate/20140422061721_create_tournament_hosts_join_table.rb (renamed from db/migrate/20140421143234_create_tournament_hosts_join_table.rb)0
-rw-r--r--db/migrate/20140422061724_create_team_user_join_table.rb (renamed from db/migrate/20140421143237_create_team_user_join_table.rb)0
-rw-r--r--db/migrate/20140422061727_create_match_team_join_table.rb (renamed from db/migrate/20140421143239_create_match_team_join_table.rb)0
-rw-r--r--db/migrate/20140422061739_add_hidden_attrs_to_user.rb (renamed from db/migrate/20140421143251_add_hidden_attrs_to_user.rb)0
24 files changed, 21 insertions, 5 deletions
diff --git a/db/migrate/20140421103137_create_simple_captcha_data.rb b/db/migrate/20140422021622_create_simple_captcha_data.rb
index 4573b20..4573b20 100644
--- a/db/migrate/20140421103137_create_simple_captcha_data.rb
+++ b/db/migrate/20140422021622_create_simple_captcha_data.rb
diff --git a/db/migrate/20140421143140_create_delayed_jobs.rb b/db/migrate/20140422061625_create_delayed_jobs.rb
index ec0dd93..ec0dd93 100644
--- a/db/migrate/20140421143140_create_delayed_jobs.rb
+++ b/db/migrate/20140422061625_create_delayed_jobs.rb
diff --git a/db/migrate/20140421143143_create_servers.rb b/db/migrate/20140422061628_create_servers.rb
index fbe1b02..fbe1b02 100644
--- a/db/migrate/20140421143143_create_servers.rb
+++ b/db/migrate/20140422061628_create_servers.rb
diff --git a/db/migrate/20140421143146_create_matches.rb b/db/migrate/20140422061631_create_matches.rb
index bdeb1cd..3786d52 100644
--- a/db/migrate/20140421143146_create_matches.rb
+++ b/db/migrate/20140422061631_create_matches.rb
@@ -2,7 +2,7 @@ class CreateMatches < ActiveRecord::Migration
def change
create_table :matches do |t|
t.integer :status
- t.references :tournament, index: true
+ t.references :tournament_stage, index: true
t.string :name
t.references :winner, index: true
t.string :remote_id
diff --git a/db/migrate/20140421143149_create_teams.rb b/db/migrate/20140422061633_create_teams.rb
index fdf9a68..fdf9a68 100644
--- a/db/migrate/20140421143149_create_teams.rb
+++ b/db/migrate/20140422061633_create_teams.rb
diff --git a/db/migrate/20140421143152_create_alerts.rb b/db/migrate/20140422061636_create_alerts.rb
index 68a8e10..68a8e10 100644
--- a/db/migrate/20140421143152_create_alerts.rb
+++ b/db/migrate/20140422061636_create_alerts.rb
diff --git a/db/migrate/20140421143155_create_pms.rb b/db/migrate/20140422061639_create_pms.rb
index 93bb5c6..93bb5c6 100644
--- a/db/migrate/20140421143155_create_pms.rb
+++ b/db/migrate/20140422061639_create_pms.rb
diff --git a/db/migrate/20140421143158_create_tournaments.rb b/db/migrate/20140422061642_create_tournaments.rb
index c0d8929..716871f 100644
--- a/db/migrate/20140421143158_create_tournaments.rb
+++ b/db/migrate/20140422061642_create_tournaments.rb
@@ -1,17 +1,19 @@
class CreateTournaments < ActiveRecord::Migration
def change
create_table :tournaments do |t|
- t.string :name
t.references :game, index: true
t.integer :status
+ t.string :name
t.integer :min_players_per_team
t.integer :max_players_per_team
t.integer :min_teams_per_match
t.integer :max_teams_per_match
t.integer :set_rounds
t.boolean :randomized_teams
+ t.string :sampling_method
t.timestamps
end
+ add_index :tournaments, :name, unique: true
end
end
diff --git a/db/migrate/20140421143201_create_games.rb b/db/migrate/20140422061645_create_games.rb
index 5e4f56f..46ed30d 100644
--- a/db/migrate/20140421143201_create_games.rb
+++ b/db/migrate/20140422061645_create_games.rb
@@ -1,15 +1,17 @@
class CreateGames < ActiveRecord::Migration
def change
create_table :games do |t|
- t.text :name
+ t.string :name
t.integer :min_players_per_team
t.integer :max_players_per_team
t.integer :min_teams_per_match
t.integer :max_teams_per_match
t.integer :set_rounds
t.boolean :randomized_teams
+ t.string :sampling_method
t.timestamps
end
+ add_index :games, :name, unique: true
end
end
diff --git a/db/migrate/20140421143204_create_users.rb b/db/migrate/20140422061648_create_users.rb
index 8032870..8032870 100644
--- a/db/migrate/20140421143204_create_users.rb
+++ b/db/migrate/20140422061648_create_users.rb
diff --git a/db/migrate/20140421143207_create_sessions.rb b/db/migrate/20140422061651_create_sessions.rb
index f667f1e..f667f1e 100644
--- a/db/migrate/20140421143207_create_sessions.rb
+++ b/db/migrate/20140422061651_create_sessions.rb
diff --git a/db/migrate/20140421143210_create_brackets.rb b/db/migrate/20140422061654_create_brackets.rb
index 8813bf2..8813bf2 100644
--- a/db/migrate/20140421143210_create_brackets.rb
+++ b/db/migrate/20140422061654_create_brackets.rb
diff --git a/db/migrate/20140421143213_create_game_settings.rb b/db/migrate/20140422061657_create_game_settings.rb
index 06fb72e..06fb72e 100644
--- a/db/migrate/20140421143213_create_game_settings.rb
+++ b/db/migrate/20140422061657_create_game_settings.rb
diff --git a/db/migrate/20140421143216_create_tournament_settings.rb b/db/migrate/20140422061700_create_tournament_settings.rb
index e56697f..e56697f 100644
--- a/db/migrate/20140421143216_create_tournament_settings.rb
+++ b/db/migrate/20140422061700_create_tournament_settings.rb
diff --git a/db/migrate/20140422061703_create_tournament_stages.rb b/db/migrate/20140422061703_create_tournament_stages.rb
new file mode 100644
index 0000000..e3668cb
--- /dev/null
+++ b/db/migrate/20140422061703_create_tournament_stages.rb
@@ -0,0 +1,11 @@
+class CreateTournamentStages < ActiveRecord::Migration
+ def change
+ create_table :tournament_stages do |t|
+ t.references :tournament, index: true
+ t.string :scheduling
+ t.text :structure
+
+ t.timestamps
+ end
+ end
+end
diff --git a/db/migrate/20140421143219_create_scores.rb b/db/migrate/20140422061706_create_statistics.rb
index 4ca0b0b..cc2e97d 100644
--- a/db/migrate/20140421143219_create_scores.rb
+++ b/db/migrate/20140422061706_create_statistics.rb
@@ -1,8 +1,9 @@
-class CreateScores < ActiveRecord::Migration
+class CreateStatistics < ActiveRecord::Migration
def change
- create_table :scores do |t|
+ create_table :statistics do |t|
t.references :user, index: true
t.references :match, index: true
+ t.string :name
t.integer :value
t.timestamps
diff --git a/db/migrate/20140421143222_create_remote_usernames.rb b/db/migrate/20140422061709_create_remote_usernames.rb
index e265985..e265985 100644
--- a/db/migrate/20140421143222_create_remote_usernames.rb
+++ b/db/migrate/20140422061709_create_remote_usernames.rb
diff --git a/db/migrate/20140421143225_create_bracket_matches.rb b/db/migrate/20140422061712_create_bracket_matches.rb
index 3323e31..3323e31 100644
--- a/db/migrate/20140421143225_create_bracket_matches.rb
+++ b/db/migrate/20140422061712_create_bracket_matches.rb
diff --git a/db/migrate/20140421143228_create_api_requests.rb b/db/migrate/20140422061715_create_api_requests.rb
index 544c330..544c330 100644
--- a/db/migrate/20140421143228_create_api_requests.rb
+++ b/db/migrate/20140422061715_create_api_requests.rb
diff --git a/db/migrate/20140421143231_create_tournament_players_join_table.rb b/db/migrate/20140422061718_create_tournament_players_join_table.rb
index be240e8..be240e8 100644
--- a/db/migrate/20140421143231_create_tournament_players_join_table.rb
+++ b/db/migrate/20140422061718_create_tournament_players_join_table.rb
diff --git a/db/migrate/20140421143234_create_tournament_hosts_join_table.rb b/db/migrate/20140422061721_create_tournament_hosts_join_table.rb
index 7521d89..7521d89 100644
--- a/db/migrate/20140421143234_create_tournament_hosts_join_table.rb
+++ b/db/migrate/20140422061721_create_tournament_hosts_join_table.rb
diff --git a/db/migrate/20140421143237_create_team_user_join_table.rb b/db/migrate/20140422061724_create_team_user_join_table.rb
index f3b57fc..f3b57fc 100644
--- a/db/migrate/20140421143237_create_team_user_join_table.rb
+++ b/db/migrate/20140422061724_create_team_user_join_table.rb
diff --git a/db/migrate/20140421143239_create_match_team_join_table.rb b/db/migrate/20140422061727_create_match_team_join_table.rb
index c2ed1b7..c2ed1b7 100644
--- a/db/migrate/20140421143239_create_match_team_join_table.rb
+++ b/db/migrate/20140422061727_create_match_team_join_table.rb
diff --git a/db/migrate/20140421143251_add_hidden_attrs_to_user.rb b/db/migrate/20140422061739_add_hidden_attrs_to_user.rb
index 9b5c505..9b5c505 100644
--- a/db/migrate/20140421143251_add_hidden_attrs_to_user.rb
+++ b/db/migrate/20140422061739_add_hidden_attrs_to_user.rb