From 5b4e3bd04d9a448643dd56ff55e77c1488bf5100 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 5 Apr 2014 22:02:08 -0400 Subject: run generate --- db/migrate/20140404212449_create_simple_captcha_data.rb | 15 --------------- db/migrate/20140405012452_create_servers.rb | 8 -------- db/migrate/20140405012455_create_matches.rb | 13 ------------- db/migrate/20140405012457_create_teams.rb | 9 --------- db/migrate/20140405012500_create_alerts.rb | 10 ---------- db/migrate/20140405012503_create_pms.rb | 11 ----------- db/migrate/20140405012506_create_tournaments.rb | 17 ----------------- db/migrate/20140405012508_create_games.rb | 15 --------------- db/migrate/20140405012510_create_users.rb | 13 ------------- db/migrate/20140405012513_create_sessions.rb | 11 ----------- db/migrate/20140405012516_create_server_settings.rb | 8 -------- db/migrate/20140405012519_create_game_settings.rb | 15 --------------- .../20140405012521_create_tournament_preferences.rb | 12 ------------ db/migrate/20140405012524_create_scores.rb | 11 ----------- db/migrate/20140405012527_create_remote_usernames.rb | 11 ----------- ...140405012529_create_tournament_players_join_table.rb | 8 -------- ...20140405012532_create_tournament_hosts_join_table.rb | 8 -------- .../20140405012535_create_team_user_join_table.rb | 8 -------- .../20140405012537_create_match_team_join_table.rb | 8 -------- db/migrate/20140405012548_add_hidden_attrs_to_user.rb | 6 ------ db/migrate/20140405215315_create_simple_captcha_data.rb | 15 +++++++++++++++ db/migrate/20140406015318_create_servers.rb | 8 ++++++++ db/migrate/20140406015321_create_matches.rb | 13 +++++++++++++ db/migrate/20140406015324_create_teams.rb | 9 +++++++++ db/migrate/20140406015327_create_alerts.rb | 10 ++++++++++ db/migrate/20140406015330_create_pms.rb | 11 +++++++++++ db/migrate/20140406015332_create_tournaments.rb | 17 +++++++++++++++++ db/migrate/20140406015335_create_games.rb | 15 +++++++++++++++ db/migrate/20140406015338_create_users.rb | 13 +++++++++++++ db/migrate/20140406015341_create_sessions.rb | 11 +++++++++++ db/migrate/20140406015344_create_server_settings.rb | 8 ++++++++ db/migrate/20140406015347_create_game_settings.rb | 15 +++++++++++++++ .../20140406015350_create_tournament_preferences.rb | 12 ++++++++++++ db/migrate/20140406015353_create_scores.rb | 11 +++++++++++ db/migrate/20140406015356_create_remote_usernames.rb | 11 +++++++++++ ...140406015359_create_tournament_players_join_table.rb | 8 ++++++++ ...20140406015401_create_tournament_hosts_join_table.rb | 8 ++++++++ .../20140406015404_create_team_user_join_table.rb | 8 ++++++++ .../20140406015406_create_match_team_join_table.rb | 8 ++++++++ db/migrate/20140406015417_add_hidden_attrs_to_user.rb | 6 ++++++ db/schema.rb | 4 ++-- 41 files changed, 219 insertions(+), 219 deletions(-) delete mode 100644 db/migrate/20140404212449_create_simple_captcha_data.rb delete mode 100644 db/migrate/20140405012452_create_servers.rb delete mode 100644 db/migrate/20140405012455_create_matches.rb delete mode 100644 db/migrate/20140405012457_create_teams.rb delete mode 100644 db/migrate/20140405012500_create_alerts.rb delete mode 100644 db/migrate/20140405012503_create_pms.rb delete mode 100644 db/migrate/20140405012506_create_tournaments.rb delete mode 100644 db/migrate/20140405012508_create_games.rb delete mode 100644 db/migrate/20140405012510_create_users.rb delete mode 100644 db/migrate/20140405012513_create_sessions.rb delete mode 100644 db/migrate/20140405012516_create_server_settings.rb delete mode 100644 db/migrate/20140405012519_create_game_settings.rb delete mode 100644 db/migrate/20140405012521_create_tournament_preferences.rb delete mode 100644 db/migrate/20140405012524_create_scores.rb delete mode 100644 db/migrate/20140405012527_create_remote_usernames.rb delete mode 100644 db/migrate/20140405012529_create_tournament_players_join_table.rb delete mode 100644 db/migrate/20140405012532_create_tournament_hosts_join_table.rb delete mode 100644 db/migrate/20140405012535_create_team_user_join_table.rb delete mode 100644 db/migrate/20140405012537_create_match_team_join_table.rb delete mode 100644 db/migrate/20140405012548_add_hidden_attrs_to_user.rb create mode 100644 db/migrate/20140405215315_create_simple_captcha_data.rb create mode 100644 db/migrate/20140406015318_create_servers.rb create mode 100644 db/migrate/20140406015321_create_matches.rb create mode 100644 db/migrate/20140406015324_create_teams.rb create mode 100644 db/migrate/20140406015327_create_alerts.rb create mode 100644 db/migrate/20140406015330_create_pms.rb create mode 100644 db/migrate/20140406015332_create_tournaments.rb create mode 100644 db/migrate/20140406015335_create_games.rb create mode 100644 db/migrate/20140406015338_create_users.rb create mode 100644 db/migrate/20140406015341_create_sessions.rb create mode 100644 db/migrate/20140406015344_create_server_settings.rb create mode 100644 db/migrate/20140406015347_create_game_settings.rb create mode 100644 db/migrate/20140406015350_create_tournament_preferences.rb create mode 100644 db/migrate/20140406015353_create_scores.rb create mode 100644 db/migrate/20140406015356_create_remote_usernames.rb create mode 100644 db/migrate/20140406015359_create_tournament_players_join_table.rb create mode 100644 db/migrate/20140406015401_create_tournament_hosts_join_table.rb create mode 100644 db/migrate/20140406015404_create_team_user_join_table.rb create mode 100644 db/migrate/20140406015406_create_match_team_join_table.rb create mode 100644 db/migrate/20140406015417_add_hidden_attrs_to_user.rb (limited to 'db') diff --git a/db/migrate/20140404212449_create_simple_captcha_data.rb b/db/migrate/20140404212449_create_simple_captcha_data.rb deleted file mode 100644 index 4573b20..0000000 --- a/db/migrate/20140404212449_create_simple_captcha_data.rb +++ /dev/null @@ -1,15 +0,0 @@ -class CreateSimpleCaptchaData < ActiveRecord::Migration - def self.up - create_table :simple_captcha_data do |t| - t.string :key, :limit => 40 - t.string :value, :limit => 6 - t.timestamps - end - - add_index :simple_captcha_data, :key, :name => "idx_key" - end - - def self.down - drop_table :simple_captcha_data - end -end diff --git a/db/migrate/20140405012452_create_servers.rb b/db/migrate/20140405012452_create_servers.rb deleted file mode 100644 index f33241a..0000000 --- a/db/migrate/20140405012452_create_servers.rb +++ /dev/null @@ -1,8 +0,0 @@ -class CreateServers < ActiveRecord::Migration - def change - create_table :servers do |t| - - t.timestamps - end - end -end diff --git a/db/migrate/20140405012455_create_matches.rb b/db/migrate/20140405012455_create_matches.rb deleted file mode 100644 index 31eea12..0000000 --- a/db/migrate/20140405012455_create_matches.rb +++ /dev/null @@ -1,13 +0,0 @@ -class CreateMatches < ActiveRecord::Migration - def change - create_table :matches do |t| - t.integer :status - t.references :tournament, index: true - t.string :name - t.references :winner, index: true - t.string :remote_id - - t.timestamps - end - end -end diff --git a/db/migrate/20140405012457_create_teams.rb b/db/migrate/20140405012457_create_teams.rb deleted file mode 100644 index fdf9a68..0000000 --- a/db/migrate/20140405012457_create_teams.rb +++ /dev/null @@ -1,9 +0,0 @@ -class CreateTeams < ActiveRecord::Migration - def change - create_table :teams do |t| - t.references :match, index: true - - t.timestamps - end - end -end diff --git a/db/migrate/20140405012500_create_alerts.rb b/db/migrate/20140405012500_create_alerts.rb deleted file mode 100644 index 68a8e10..0000000 --- a/db/migrate/20140405012500_create_alerts.rb +++ /dev/null @@ -1,10 +0,0 @@ -class CreateAlerts < ActiveRecord::Migration - def change - create_table :alerts do |t| - t.references :author, index: true - t.text :message - - t.timestamps - end - end -end diff --git a/db/migrate/20140405012503_create_pms.rb b/db/migrate/20140405012503_create_pms.rb deleted file mode 100644 index 93bb5c6..0000000 --- a/db/migrate/20140405012503_create_pms.rb +++ /dev/null @@ -1,11 +0,0 @@ -class CreatePms < ActiveRecord::Migration - def change - create_table :pms do |t| - t.references :author, index: true - t.references :recipient, index: true - t.text :message - - t.timestamps - end - end -end diff --git a/db/migrate/20140405012506_create_tournaments.rb b/db/migrate/20140405012506_create_tournaments.rb deleted file mode 100644 index c0d8929..0000000 --- a/db/migrate/20140405012506_create_tournaments.rb +++ /dev/null @@ -1,17 +0,0 @@ -class CreateTournaments < ActiveRecord::Migration - def change - create_table :tournaments do |t| - t.string :name - t.references :game, index: true - t.integer :status - 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.timestamps - end - end -end diff --git a/db/migrate/20140405012508_create_games.rb b/db/migrate/20140405012508_create_games.rb deleted file mode 100644 index 5e4f56f..0000000 --- a/db/migrate/20140405012508_create_games.rb +++ /dev/null @@ -1,15 +0,0 @@ -class CreateGames < ActiveRecord::Migration - def change - create_table :games do |t| - t.text :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.timestamps - end - end -end diff --git a/db/migrate/20140405012510_create_users.rb b/db/migrate/20140405012510_create_users.rb deleted file mode 100644 index 8032870..0000000 --- a/db/migrate/20140405012510_create_users.rb +++ /dev/null @@ -1,13 +0,0 @@ -class CreateUsers < ActiveRecord::Migration - def change - create_table :users do |t| - t.string :name - t.string :email - t.string :user_name - - t.timestamps - end - add_index :users, :email, unique: true - add_index :users, :user_name, unique: true - end -end diff --git a/db/migrate/20140405012513_create_sessions.rb b/db/migrate/20140405012513_create_sessions.rb deleted file mode 100644 index f667f1e..0000000 --- a/db/migrate/20140405012513_create_sessions.rb +++ /dev/null @@ -1,11 +0,0 @@ -class CreateSessions < ActiveRecord::Migration - def change - create_table :sessions do |t| - t.references :user, index: true - t.string :token - - t.timestamps - end - add_index :sessions, :token, unique: true - end -end diff --git a/db/migrate/20140405012516_create_server_settings.rb b/db/migrate/20140405012516_create_server_settings.rb deleted file mode 100644 index dfdd91b..0000000 --- a/db/migrate/20140405012516_create_server_settings.rb +++ /dev/null @@ -1,8 +0,0 @@ -class CreateServerSettings < ActiveRecord::Migration - def change - create_table :server_settings do |t| - - t.timestamps - end - end -end diff --git a/db/migrate/20140405012519_create_game_settings.rb b/db/migrate/20140405012519_create_game_settings.rb deleted file mode 100644 index eed6b00..0000000 --- a/db/migrate/20140405012519_create_game_settings.rb +++ /dev/null @@ -1,15 +0,0 @@ -class CreateGameSettings < ActiveRecord::Migration - def change - create_table :game_settings do |t| - t.references :game, index: true - t.integer :type - t.string :name - t.text :default - t.text :description - t.text :type_opt - t.integer :display_order - - t.timestamps - end - end -end diff --git a/db/migrate/20140405012521_create_tournament_preferences.rb b/db/migrate/20140405012521_create_tournament_preferences.rb deleted file mode 100644 index 991d659..0000000 --- a/db/migrate/20140405012521_create_tournament_preferences.rb +++ /dev/null @@ -1,12 +0,0 @@ -class CreateTournamentPreferences < ActiveRecord::Migration - def change - create_table :tournament_preferences do |t| - t.references :tournament, index: true - t.integer :vartype - t.string :name - t.text :value - - t.timestamps - end - end -end diff --git a/db/migrate/20140405012524_create_scores.rb b/db/migrate/20140405012524_create_scores.rb deleted file mode 100644 index 4ca0b0b..0000000 --- a/db/migrate/20140405012524_create_scores.rb +++ /dev/null @@ -1,11 +0,0 @@ -class CreateScores < ActiveRecord::Migration - def change - create_table :scores do |t| - t.references :user, index: true - t.references :match, index: true - t.integer :value - - t.timestamps - end - end -end diff --git a/db/migrate/20140405012527_create_remote_usernames.rb b/db/migrate/20140405012527_create_remote_usernames.rb deleted file mode 100644 index e265985..0000000 --- a/db/migrate/20140405012527_create_remote_usernames.rb +++ /dev/null @@ -1,11 +0,0 @@ -class CreateRemoteUsernames < ActiveRecord::Migration - def change - create_table :remote_usernames do |t| - t.references :game, index: true - t.references :user, index: true - t.text :json_value - - t.timestamps - end - end -end diff --git a/db/migrate/20140405012529_create_tournament_players_join_table.rb b/db/migrate/20140405012529_create_tournament_players_join_table.rb deleted file mode 100644 index be240e8..0000000 --- a/db/migrate/20140405012529_create_tournament_players_join_table.rb +++ /dev/null @@ -1,8 +0,0 @@ -class CreateTournamentPlayersJoinTable < ActiveRecord::Migration - def change - create_join_table :players, :tournaments do |t| - # t.index [:player_id, :tournament_id] - # t.index [:tournament_id, :player_id] - end - end -end diff --git a/db/migrate/20140405012532_create_tournament_hosts_join_table.rb b/db/migrate/20140405012532_create_tournament_hosts_join_table.rb deleted file mode 100644 index 7521d89..0000000 --- a/db/migrate/20140405012532_create_tournament_hosts_join_table.rb +++ /dev/null @@ -1,8 +0,0 @@ -class CreateTournamentHostsJoinTable < ActiveRecord::Migration - def change - create_join_table :hosts, :tournaments do |t| - # t.index [:host_id, :tournament_id] - # t.index [:tournament_id, :host_id] - end - end -end diff --git a/db/migrate/20140405012535_create_team_user_join_table.rb b/db/migrate/20140405012535_create_team_user_join_table.rb deleted file mode 100644 index f3b57fc..0000000 --- a/db/migrate/20140405012535_create_team_user_join_table.rb +++ /dev/null @@ -1,8 +0,0 @@ -class CreateTeamUserJoinTable < ActiveRecord::Migration - def change - create_join_table :teams, :users do |t| - # t.index [:team_id, :user_id] - # t.index [:user_id, :team_id] - end - end -end diff --git a/db/migrate/20140405012537_create_match_team_join_table.rb b/db/migrate/20140405012537_create_match_team_join_table.rb deleted file mode 100644 index c2ed1b7..0000000 --- a/db/migrate/20140405012537_create_match_team_join_table.rb +++ /dev/null @@ -1,8 +0,0 @@ -class CreateMatchTeamJoinTable < ActiveRecord::Migration - def change - create_join_table :matches, :teams do |t| - # t.index [:match_id, :team_id] - # t.index [:team_id, :match_id] - end - end -end diff --git a/db/migrate/20140405012548_add_hidden_attrs_to_user.rb b/db/migrate/20140405012548_add_hidden_attrs_to_user.rb deleted file mode 100644 index 9b5c505..0000000 --- a/db/migrate/20140405012548_add_hidden_attrs_to_user.rb +++ /dev/null @@ -1,6 +0,0 @@ -class AddHiddenAttrsToUser < ActiveRecord::Migration - def change - add_column :users, :password_digest, :string - add_column :users, :permissions, :integer - end -end diff --git a/db/migrate/20140405215315_create_simple_captcha_data.rb b/db/migrate/20140405215315_create_simple_captcha_data.rb new file mode 100644 index 0000000..4573b20 --- /dev/null +++ b/db/migrate/20140405215315_create_simple_captcha_data.rb @@ -0,0 +1,15 @@ +class CreateSimpleCaptchaData < ActiveRecord::Migration + def self.up + create_table :simple_captcha_data do |t| + t.string :key, :limit => 40 + t.string :value, :limit => 6 + t.timestamps + end + + add_index :simple_captcha_data, :key, :name => "idx_key" + end + + def self.down + drop_table :simple_captcha_data + end +end diff --git a/db/migrate/20140406015318_create_servers.rb b/db/migrate/20140406015318_create_servers.rb new file mode 100644 index 0000000..f33241a --- /dev/null +++ b/db/migrate/20140406015318_create_servers.rb @@ -0,0 +1,8 @@ +class CreateServers < ActiveRecord::Migration + def change + create_table :servers do |t| + + t.timestamps + end + end +end diff --git a/db/migrate/20140406015321_create_matches.rb b/db/migrate/20140406015321_create_matches.rb new file mode 100644 index 0000000..31eea12 --- /dev/null +++ b/db/migrate/20140406015321_create_matches.rb @@ -0,0 +1,13 @@ +class CreateMatches < ActiveRecord::Migration + def change + create_table :matches do |t| + t.integer :status + t.references :tournament, index: true + t.string :name + t.references :winner, index: true + t.string :remote_id + + t.timestamps + end + end +end diff --git a/db/migrate/20140406015324_create_teams.rb b/db/migrate/20140406015324_create_teams.rb new file mode 100644 index 0000000..fdf9a68 --- /dev/null +++ b/db/migrate/20140406015324_create_teams.rb @@ -0,0 +1,9 @@ +class CreateTeams < ActiveRecord::Migration + def change + create_table :teams do |t| + t.references :match, index: true + + t.timestamps + end + end +end diff --git a/db/migrate/20140406015327_create_alerts.rb b/db/migrate/20140406015327_create_alerts.rb new file mode 100644 index 0000000..68a8e10 --- /dev/null +++ b/db/migrate/20140406015327_create_alerts.rb @@ -0,0 +1,10 @@ +class CreateAlerts < ActiveRecord::Migration + def change + create_table :alerts do |t| + t.references :author, index: true + t.text :message + + t.timestamps + end + end +end diff --git a/db/migrate/20140406015330_create_pms.rb b/db/migrate/20140406015330_create_pms.rb new file mode 100644 index 0000000..93bb5c6 --- /dev/null +++ b/db/migrate/20140406015330_create_pms.rb @@ -0,0 +1,11 @@ +class CreatePms < ActiveRecord::Migration + def change + create_table :pms do |t| + t.references :author, index: true + t.references :recipient, index: true + t.text :message + + t.timestamps + end + end +end diff --git a/db/migrate/20140406015332_create_tournaments.rb b/db/migrate/20140406015332_create_tournaments.rb new file mode 100644 index 0000000..c0d8929 --- /dev/null +++ b/db/migrate/20140406015332_create_tournaments.rb @@ -0,0 +1,17 @@ +class CreateTournaments < ActiveRecord::Migration + def change + create_table :tournaments do |t| + t.string :name + t.references :game, index: true + t.integer :status + 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.timestamps + end + end +end diff --git a/db/migrate/20140406015335_create_games.rb b/db/migrate/20140406015335_create_games.rb new file mode 100644 index 0000000..5e4f56f --- /dev/null +++ b/db/migrate/20140406015335_create_games.rb @@ -0,0 +1,15 @@ +class CreateGames < ActiveRecord::Migration + def change + create_table :games do |t| + t.text :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.timestamps + end + end +end diff --git a/db/migrate/20140406015338_create_users.rb b/db/migrate/20140406015338_create_users.rb new file mode 100644 index 0000000..8032870 --- /dev/null +++ b/db/migrate/20140406015338_create_users.rb @@ -0,0 +1,13 @@ +class CreateUsers < ActiveRecord::Migration + def change + create_table :users do |t| + t.string :name + t.string :email + t.string :user_name + + t.timestamps + end + add_index :users, :email, unique: true + add_index :users, :user_name, unique: true + end +end diff --git a/db/migrate/20140406015341_create_sessions.rb b/db/migrate/20140406015341_create_sessions.rb new file mode 100644 index 0000000..f667f1e --- /dev/null +++ b/db/migrate/20140406015341_create_sessions.rb @@ -0,0 +1,11 @@ +class CreateSessions < ActiveRecord::Migration + def change + create_table :sessions do |t| + t.references :user, index: true + t.string :token + + t.timestamps + end + add_index :sessions, :token, unique: true + end +end diff --git a/db/migrate/20140406015344_create_server_settings.rb b/db/migrate/20140406015344_create_server_settings.rb new file mode 100644 index 0000000..dfdd91b --- /dev/null +++ b/db/migrate/20140406015344_create_server_settings.rb @@ -0,0 +1,8 @@ +class CreateServerSettings < ActiveRecord::Migration + def change + create_table :server_settings do |t| + + t.timestamps + end + end +end diff --git a/db/migrate/20140406015347_create_game_settings.rb b/db/migrate/20140406015347_create_game_settings.rb new file mode 100644 index 0000000..b1caf5d --- /dev/null +++ b/db/migrate/20140406015347_create_game_settings.rb @@ -0,0 +1,15 @@ +class CreateGameSettings < ActiveRecord::Migration + def change + create_table :game_settings do |t| + t.references :game, index: true + t.integer :stype + t.string :name + t.text :default + t.text :description + t.text :type_opt + t.integer :display_order + + t.timestamps + end + end +end diff --git a/db/migrate/20140406015350_create_tournament_preferences.rb b/db/migrate/20140406015350_create_tournament_preferences.rb new file mode 100644 index 0000000..991d659 --- /dev/null +++ b/db/migrate/20140406015350_create_tournament_preferences.rb @@ -0,0 +1,12 @@ +class CreateTournamentPreferences < ActiveRecord::Migration + def change + create_table :tournament_preferences do |t| + t.references :tournament, index: true + t.integer :vartype + t.string :name + t.text :value + + t.timestamps + end + end +end diff --git a/db/migrate/20140406015353_create_scores.rb b/db/migrate/20140406015353_create_scores.rb new file mode 100644 index 0000000..4ca0b0b --- /dev/null +++ b/db/migrate/20140406015353_create_scores.rb @@ -0,0 +1,11 @@ +class CreateScores < ActiveRecord::Migration + def change + create_table :scores do |t| + t.references :user, index: true + t.references :match, index: true + t.integer :value + + t.timestamps + end + end +end diff --git a/db/migrate/20140406015356_create_remote_usernames.rb b/db/migrate/20140406015356_create_remote_usernames.rb new file mode 100644 index 0000000..e265985 --- /dev/null +++ b/db/migrate/20140406015356_create_remote_usernames.rb @@ -0,0 +1,11 @@ +class CreateRemoteUsernames < ActiveRecord::Migration + def change + create_table :remote_usernames do |t| + t.references :game, index: true + t.references :user, index: true + t.text :json_value + + t.timestamps + end + end +end diff --git a/db/migrate/20140406015359_create_tournament_players_join_table.rb b/db/migrate/20140406015359_create_tournament_players_join_table.rb new file mode 100644 index 0000000..be240e8 --- /dev/null +++ b/db/migrate/20140406015359_create_tournament_players_join_table.rb @@ -0,0 +1,8 @@ +class CreateTournamentPlayersJoinTable < ActiveRecord::Migration + def change + create_join_table :players, :tournaments do |t| + # t.index [:player_id, :tournament_id] + # t.index [:tournament_id, :player_id] + end + end +end diff --git a/db/migrate/20140406015401_create_tournament_hosts_join_table.rb b/db/migrate/20140406015401_create_tournament_hosts_join_table.rb new file mode 100644 index 0000000..7521d89 --- /dev/null +++ b/db/migrate/20140406015401_create_tournament_hosts_join_table.rb @@ -0,0 +1,8 @@ +class CreateTournamentHostsJoinTable < ActiveRecord::Migration + def change + create_join_table :hosts, :tournaments do |t| + # t.index [:host_id, :tournament_id] + # t.index [:tournament_id, :host_id] + end + end +end diff --git a/db/migrate/20140406015404_create_team_user_join_table.rb b/db/migrate/20140406015404_create_team_user_join_table.rb new file mode 100644 index 0000000..f3b57fc --- /dev/null +++ b/db/migrate/20140406015404_create_team_user_join_table.rb @@ -0,0 +1,8 @@ +class CreateTeamUserJoinTable < ActiveRecord::Migration + def change + create_join_table :teams, :users do |t| + # t.index [:team_id, :user_id] + # t.index [:user_id, :team_id] + end + end +end diff --git a/db/migrate/20140406015406_create_match_team_join_table.rb b/db/migrate/20140406015406_create_match_team_join_table.rb new file mode 100644 index 0000000..c2ed1b7 --- /dev/null +++ b/db/migrate/20140406015406_create_match_team_join_table.rb @@ -0,0 +1,8 @@ +class CreateMatchTeamJoinTable < ActiveRecord::Migration + def change + create_join_table :matches, :teams do |t| + # t.index [:match_id, :team_id] + # t.index [:team_id, :match_id] + end + end +end diff --git a/db/migrate/20140406015417_add_hidden_attrs_to_user.rb b/db/migrate/20140406015417_add_hidden_attrs_to_user.rb new file mode 100644 index 0000000..9b5c505 --- /dev/null +++ b/db/migrate/20140406015417_add_hidden_attrs_to_user.rb @@ -0,0 +1,6 @@ +class AddHiddenAttrsToUser < ActiveRecord::Migration + def change + add_column :users, :password_digest, :string + add_column :users, :permissions, :integer + end +end diff --git a/db/schema.rb b/db/schema.rb index c0d4fee..829ad0e 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: 20140405012548) do +ActiveRecord::Schema.define(version: 20140406015417) do create_table "alerts", force: true do |t| t.integer "author_id" @@ -24,7 +24,7 @@ ActiveRecord::Schema.define(version: 20140405012548) do create_table "game_settings", force: true do |t| t.integer "game_id" - t.integer "type" + t.integer "stype" t.string "name" t.text "default" t.text "description" -- cgit v1.2.3-2-g168b From d2e4f58410c20f5e7b9e8e0dde3fd55d201af4bb Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 6 Apr 2014 13:18:00 -0400 Subject: run generate --- db/migrate/20140405215315_create_simple_captcha_data.rb | 15 --------------- db/migrate/20140406015318_create_servers.rb | 8 -------- db/migrate/20140406015321_create_matches.rb | 13 ------------- db/migrate/20140406015324_create_teams.rb | 9 --------- db/migrate/20140406015327_create_alerts.rb | 10 ---------- db/migrate/20140406015330_create_pms.rb | 11 ----------- db/migrate/20140406015332_create_tournaments.rb | 17 ----------------- db/migrate/20140406015335_create_games.rb | 15 --------------- db/migrate/20140406015338_create_users.rb | 13 ------------- db/migrate/20140406015341_create_sessions.rb | 11 ----------- db/migrate/20140406015344_create_server_settings.rb | 8 -------- db/migrate/20140406015347_create_game_settings.rb | 15 --------------- .../20140406015350_create_tournament_preferences.rb | 12 ------------ db/migrate/20140406015353_create_scores.rb | 11 ----------- db/migrate/20140406015356_create_remote_usernames.rb | 11 ----------- ...140406015359_create_tournament_players_join_table.rb | 8 -------- ...20140406015401_create_tournament_hosts_join_table.rb | 8 -------- .../20140406015404_create_team_user_join_table.rb | 8 -------- .../20140406015406_create_match_team_join_table.rb | 8 -------- db/migrate/20140406015417_add_hidden_attrs_to_user.rb | 6 ------ db/migrate/20140406131442_create_simple_captcha_data.rb | 15 +++++++++++++++ db/migrate/20140406171445_create_servers.rb | 9 +++++++++ db/migrate/20140406171448_create_matches.rb | 13 +++++++++++++ db/migrate/20140406171451_create_teams.rb | 9 +++++++++ db/migrate/20140406171453_create_alerts.rb | 10 ++++++++++ db/migrate/20140406171456_create_pms.rb | 11 +++++++++++ db/migrate/20140406171459_create_tournaments.rb | 17 +++++++++++++++++ db/migrate/20140406171502_create_games.rb | 15 +++++++++++++++ db/migrate/20140406171505_create_users.rb | 13 +++++++++++++ db/migrate/20140406171508_create_sessions.rb | 11 +++++++++++ db/migrate/20140406171510_create_server_settings.rb | 8 ++++++++ db/migrate/20140406171513_create_game_settings.rb | 15 +++++++++++++++ .../20140406171516_create_tournament_preferences.rb | 12 ++++++++++++ db/migrate/20140406171519_create_scores.rb | 11 +++++++++++ db/migrate/20140406171522_create_remote_usernames.rb | 11 +++++++++++ ...140406171525_create_tournament_players_join_table.rb | 8 ++++++++ ...20140406171527_create_tournament_hosts_join_table.rb | 8 ++++++++ .../20140406171530_create_team_user_join_table.rb | 8 ++++++++ .../20140406171532_create_match_team_join_table.rb | 8 ++++++++ db/migrate/20140406171543_add_hidden_attrs_to_user.rb | 6 ++++++ db/schema.rb | 3 ++- 41 files changed, 220 insertions(+), 218 deletions(-) delete mode 100644 db/migrate/20140405215315_create_simple_captcha_data.rb delete mode 100644 db/migrate/20140406015318_create_servers.rb delete mode 100644 db/migrate/20140406015321_create_matches.rb delete mode 100644 db/migrate/20140406015324_create_teams.rb delete mode 100644 db/migrate/20140406015327_create_alerts.rb delete mode 100644 db/migrate/20140406015330_create_pms.rb delete mode 100644 db/migrate/20140406015332_create_tournaments.rb delete mode 100644 db/migrate/20140406015335_create_games.rb delete mode 100644 db/migrate/20140406015338_create_users.rb delete mode 100644 db/migrate/20140406015341_create_sessions.rb delete mode 100644 db/migrate/20140406015344_create_server_settings.rb delete mode 100644 db/migrate/20140406015347_create_game_settings.rb delete mode 100644 db/migrate/20140406015350_create_tournament_preferences.rb delete mode 100644 db/migrate/20140406015353_create_scores.rb delete mode 100644 db/migrate/20140406015356_create_remote_usernames.rb delete mode 100644 db/migrate/20140406015359_create_tournament_players_join_table.rb delete mode 100644 db/migrate/20140406015401_create_tournament_hosts_join_table.rb delete mode 100644 db/migrate/20140406015404_create_team_user_join_table.rb delete mode 100644 db/migrate/20140406015406_create_match_team_join_table.rb delete mode 100644 db/migrate/20140406015417_add_hidden_attrs_to_user.rb create mode 100644 db/migrate/20140406131442_create_simple_captcha_data.rb create mode 100644 db/migrate/20140406171445_create_servers.rb create mode 100644 db/migrate/20140406171448_create_matches.rb create mode 100644 db/migrate/20140406171451_create_teams.rb create mode 100644 db/migrate/20140406171453_create_alerts.rb create mode 100644 db/migrate/20140406171456_create_pms.rb create mode 100644 db/migrate/20140406171459_create_tournaments.rb create mode 100644 db/migrate/20140406171502_create_games.rb create mode 100644 db/migrate/20140406171505_create_users.rb create mode 100644 db/migrate/20140406171508_create_sessions.rb create mode 100644 db/migrate/20140406171510_create_server_settings.rb create mode 100644 db/migrate/20140406171513_create_game_settings.rb create mode 100644 db/migrate/20140406171516_create_tournament_preferences.rb create mode 100644 db/migrate/20140406171519_create_scores.rb create mode 100644 db/migrate/20140406171522_create_remote_usernames.rb create mode 100644 db/migrate/20140406171525_create_tournament_players_join_table.rb create mode 100644 db/migrate/20140406171527_create_tournament_hosts_join_table.rb create mode 100644 db/migrate/20140406171530_create_team_user_join_table.rb create mode 100644 db/migrate/20140406171532_create_match_team_join_table.rb create mode 100644 db/migrate/20140406171543_add_hidden_attrs_to_user.rb (limited to 'db') diff --git a/db/migrate/20140405215315_create_simple_captcha_data.rb b/db/migrate/20140405215315_create_simple_captcha_data.rb deleted file mode 100644 index 4573b20..0000000 --- a/db/migrate/20140405215315_create_simple_captcha_data.rb +++ /dev/null @@ -1,15 +0,0 @@ -class CreateSimpleCaptchaData < ActiveRecord::Migration - def self.up - create_table :simple_captcha_data do |t| - t.string :key, :limit => 40 - t.string :value, :limit => 6 - t.timestamps - end - - add_index :simple_captcha_data, :key, :name => "idx_key" - end - - def self.down - drop_table :simple_captcha_data - end -end diff --git a/db/migrate/20140406015318_create_servers.rb b/db/migrate/20140406015318_create_servers.rb deleted file mode 100644 index f33241a..0000000 --- a/db/migrate/20140406015318_create_servers.rb +++ /dev/null @@ -1,8 +0,0 @@ -class CreateServers < ActiveRecord::Migration - def change - create_table :servers do |t| - - t.timestamps - end - end -end diff --git a/db/migrate/20140406015321_create_matches.rb b/db/migrate/20140406015321_create_matches.rb deleted file mode 100644 index 31eea12..0000000 --- a/db/migrate/20140406015321_create_matches.rb +++ /dev/null @@ -1,13 +0,0 @@ -class CreateMatches < ActiveRecord::Migration - def change - create_table :matches do |t| - t.integer :status - t.references :tournament, index: true - t.string :name - t.references :winner, index: true - t.string :remote_id - - t.timestamps - end - end -end diff --git a/db/migrate/20140406015324_create_teams.rb b/db/migrate/20140406015324_create_teams.rb deleted file mode 100644 index fdf9a68..0000000 --- a/db/migrate/20140406015324_create_teams.rb +++ /dev/null @@ -1,9 +0,0 @@ -class CreateTeams < ActiveRecord::Migration - def change - create_table :teams do |t| - t.references :match, index: true - - t.timestamps - end - end -end diff --git a/db/migrate/20140406015327_create_alerts.rb b/db/migrate/20140406015327_create_alerts.rb deleted file mode 100644 index 68a8e10..0000000 --- a/db/migrate/20140406015327_create_alerts.rb +++ /dev/null @@ -1,10 +0,0 @@ -class CreateAlerts < ActiveRecord::Migration - def change - create_table :alerts do |t| - t.references :author, index: true - t.text :message - - t.timestamps - end - end -end diff --git a/db/migrate/20140406015330_create_pms.rb b/db/migrate/20140406015330_create_pms.rb deleted file mode 100644 index 93bb5c6..0000000 --- a/db/migrate/20140406015330_create_pms.rb +++ /dev/null @@ -1,11 +0,0 @@ -class CreatePms < ActiveRecord::Migration - def change - create_table :pms do |t| - t.references :author, index: true - t.references :recipient, index: true - t.text :message - - t.timestamps - end - end -end diff --git a/db/migrate/20140406015332_create_tournaments.rb b/db/migrate/20140406015332_create_tournaments.rb deleted file mode 100644 index c0d8929..0000000 --- a/db/migrate/20140406015332_create_tournaments.rb +++ /dev/null @@ -1,17 +0,0 @@ -class CreateTournaments < ActiveRecord::Migration - def change - create_table :tournaments do |t| - t.string :name - t.references :game, index: true - t.integer :status - 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.timestamps - end - end -end diff --git a/db/migrate/20140406015335_create_games.rb b/db/migrate/20140406015335_create_games.rb deleted file mode 100644 index 5e4f56f..0000000 --- a/db/migrate/20140406015335_create_games.rb +++ /dev/null @@ -1,15 +0,0 @@ -class CreateGames < ActiveRecord::Migration - def change - create_table :games do |t| - t.text :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.timestamps - end - end -end diff --git a/db/migrate/20140406015338_create_users.rb b/db/migrate/20140406015338_create_users.rb deleted file mode 100644 index 8032870..0000000 --- a/db/migrate/20140406015338_create_users.rb +++ /dev/null @@ -1,13 +0,0 @@ -class CreateUsers < ActiveRecord::Migration - def change - create_table :users do |t| - t.string :name - t.string :email - t.string :user_name - - t.timestamps - end - add_index :users, :email, unique: true - add_index :users, :user_name, unique: true - end -end diff --git a/db/migrate/20140406015341_create_sessions.rb b/db/migrate/20140406015341_create_sessions.rb deleted file mode 100644 index f667f1e..0000000 --- a/db/migrate/20140406015341_create_sessions.rb +++ /dev/null @@ -1,11 +0,0 @@ -class CreateSessions < ActiveRecord::Migration - def change - create_table :sessions do |t| - t.references :user, index: true - t.string :token - - t.timestamps - end - add_index :sessions, :token, unique: true - end -end diff --git a/db/migrate/20140406015344_create_server_settings.rb b/db/migrate/20140406015344_create_server_settings.rb deleted file mode 100644 index dfdd91b..0000000 --- a/db/migrate/20140406015344_create_server_settings.rb +++ /dev/null @@ -1,8 +0,0 @@ -class CreateServerSettings < ActiveRecord::Migration - def change - create_table :server_settings do |t| - - t.timestamps - end - end -end diff --git a/db/migrate/20140406015347_create_game_settings.rb b/db/migrate/20140406015347_create_game_settings.rb deleted file mode 100644 index b1caf5d..0000000 --- a/db/migrate/20140406015347_create_game_settings.rb +++ /dev/null @@ -1,15 +0,0 @@ -class CreateGameSettings < ActiveRecord::Migration - def change - create_table :game_settings do |t| - t.references :game, index: true - t.integer :stype - t.string :name - t.text :default - t.text :description - t.text :type_opt - t.integer :display_order - - t.timestamps - end - end -end diff --git a/db/migrate/20140406015350_create_tournament_preferences.rb b/db/migrate/20140406015350_create_tournament_preferences.rb deleted file mode 100644 index 991d659..0000000 --- a/db/migrate/20140406015350_create_tournament_preferences.rb +++ /dev/null @@ -1,12 +0,0 @@ -class CreateTournamentPreferences < ActiveRecord::Migration - def change - create_table :tournament_preferences do |t| - t.references :tournament, index: true - t.integer :vartype - t.string :name - t.text :value - - t.timestamps - end - end -end diff --git a/db/migrate/20140406015353_create_scores.rb b/db/migrate/20140406015353_create_scores.rb deleted file mode 100644 index 4ca0b0b..0000000 --- a/db/migrate/20140406015353_create_scores.rb +++ /dev/null @@ -1,11 +0,0 @@ -class CreateScores < ActiveRecord::Migration - def change - create_table :scores do |t| - t.references :user, index: true - t.references :match, index: true - t.integer :value - - t.timestamps - end - end -end diff --git a/db/migrate/20140406015356_create_remote_usernames.rb b/db/migrate/20140406015356_create_remote_usernames.rb deleted file mode 100644 index e265985..0000000 --- a/db/migrate/20140406015356_create_remote_usernames.rb +++ /dev/null @@ -1,11 +0,0 @@ -class CreateRemoteUsernames < ActiveRecord::Migration - def change - create_table :remote_usernames do |t| - t.references :game, index: true - t.references :user, index: true - t.text :json_value - - t.timestamps - end - end -end diff --git a/db/migrate/20140406015359_create_tournament_players_join_table.rb b/db/migrate/20140406015359_create_tournament_players_join_table.rb deleted file mode 100644 index be240e8..0000000 --- a/db/migrate/20140406015359_create_tournament_players_join_table.rb +++ /dev/null @@ -1,8 +0,0 @@ -class CreateTournamentPlayersJoinTable < ActiveRecord::Migration - def change - create_join_table :players, :tournaments do |t| - # t.index [:player_id, :tournament_id] - # t.index [:tournament_id, :player_id] - end - end -end diff --git a/db/migrate/20140406015401_create_tournament_hosts_join_table.rb b/db/migrate/20140406015401_create_tournament_hosts_join_table.rb deleted file mode 100644 index 7521d89..0000000 --- a/db/migrate/20140406015401_create_tournament_hosts_join_table.rb +++ /dev/null @@ -1,8 +0,0 @@ -class CreateTournamentHostsJoinTable < ActiveRecord::Migration - def change - create_join_table :hosts, :tournaments do |t| - # t.index [:host_id, :tournament_id] - # t.index [:tournament_id, :host_id] - end - end -end diff --git a/db/migrate/20140406015404_create_team_user_join_table.rb b/db/migrate/20140406015404_create_team_user_join_table.rb deleted file mode 100644 index f3b57fc..0000000 --- a/db/migrate/20140406015404_create_team_user_join_table.rb +++ /dev/null @@ -1,8 +0,0 @@ -class CreateTeamUserJoinTable < ActiveRecord::Migration - def change - create_join_table :teams, :users do |t| - # t.index [:team_id, :user_id] - # t.index [:user_id, :team_id] - end - end -end diff --git a/db/migrate/20140406015406_create_match_team_join_table.rb b/db/migrate/20140406015406_create_match_team_join_table.rb deleted file mode 100644 index c2ed1b7..0000000 --- a/db/migrate/20140406015406_create_match_team_join_table.rb +++ /dev/null @@ -1,8 +0,0 @@ -class CreateMatchTeamJoinTable < ActiveRecord::Migration - def change - create_join_table :matches, :teams do |t| - # t.index [:match_id, :team_id] - # t.index [:team_id, :match_id] - end - end -end diff --git a/db/migrate/20140406015417_add_hidden_attrs_to_user.rb b/db/migrate/20140406015417_add_hidden_attrs_to_user.rb deleted file mode 100644 index 9b5c505..0000000 --- a/db/migrate/20140406015417_add_hidden_attrs_to_user.rb +++ /dev/null @@ -1,6 +0,0 @@ -class AddHiddenAttrsToUser < ActiveRecord::Migration - def change - add_column :users, :password_digest, :string - add_column :users, :permissions, :integer - end -end diff --git a/db/migrate/20140406131442_create_simple_captcha_data.rb b/db/migrate/20140406131442_create_simple_captcha_data.rb new file mode 100644 index 0000000..4573b20 --- /dev/null +++ b/db/migrate/20140406131442_create_simple_captcha_data.rb @@ -0,0 +1,15 @@ +class CreateSimpleCaptchaData < ActiveRecord::Migration + def self.up + create_table :simple_captcha_data do |t| + t.string :key, :limit => 40 + t.string :value, :limit => 6 + t.timestamps + end + + add_index :simple_captcha_data, :key, :name => "idx_key" + end + + def self.down + drop_table :simple_captcha_data + end +end diff --git a/db/migrate/20140406171445_create_servers.rb b/db/migrate/20140406171445_create_servers.rb new file mode 100644 index 0000000..fbe1b02 --- /dev/null +++ b/db/migrate/20140406171445_create_servers.rb @@ -0,0 +1,9 @@ +class CreateServers < ActiveRecord::Migration + def change + create_table :servers do |t| + t.integer :default_user_permissions + + t.timestamps + end + end +end diff --git a/db/migrate/20140406171448_create_matches.rb b/db/migrate/20140406171448_create_matches.rb new file mode 100644 index 0000000..31eea12 --- /dev/null +++ b/db/migrate/20140406171448_create_matches.rb @@ -0,0 +1,13 @@ +class CreateMatches < ActiveRecord::Migration + def change + create_table :matches do |t| + t.integer :status + t.references :tournament, index: true + t.string :name + t.references :winner, index: true + t.string :remote_id + + t.timestamps + end + end +end diff --git a/db/migrate/20140406171451_create_teams.rb b/db/migrate/20140406171451_create_teams.rb new file mode 100644 index 0000000..fdf9a68 --- /dev/null +++ b/db/migrate/20140406171451_create_teams.rb @@ -0,0 +1,9 @@ +class CreateTeams < ActiveRecord::Migration + def change + create_table :teams do |t| + t.references :match, index: true + + t.timestamps + end + end +end diff --git a/db/migrate/20140406171453_create_alerts.rb b/db/migrate/20140406171453_create_alerts.rb new file mode 100644 index 0000000..68a8e10 --- /dev/null +++ b/db/migrate/20140406171453_create_alerts.rb @@ -0,0 +1,10 @@ +class CreateAlerts < ActiveRecord::Migration + def change + create_table :alerts do |t| + t.references :author, index: true + t.text :message + + t.timestamps + end + end +end diff --git a/db/migrate/20140406171456_create_pms.rb b/db/migrate/20140406171456_create_pms.rb new file mode 100644 index 0000000..93bb5c6 --- /dev/null +++ b/db/migrate/20140406171456_create_pms.rb @@ -0,0 +1,11 @@ +class CreatePms < ActiveRecord::Migration + def change + create_table :pms do |t| + t.references :author, index: true + t.references :recipient, index: true + t.text :message + + t.timestamps + end + end +end diff --git a/db/migrate/20140406171459_create_tournaments.rb b/db/migrate/20140406171459_create_tournaments.rb new file mode 100644 index 0000000..c0d8929 --- /dev/null +++ b/db/migrate/20140406171459_create_tournaments.rb @@ -0,0 +1,17 @@ +class CreateTournaments < ActiveRecord::Migration + def change + create_table :tournaments do |t| + t.string :name + t.references :game, index: true + t.integer :status + 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.timestamps + end + end +end diff --git a/db/migrate/20140406171502_create_games.rb b/db/migrate/20140406171502_create_games.rb new file mode 100644 index 0000000..5e4f56f --- /dev/null +++ b/db/migrate/20140406171502_create_games.rb @@ -0,0 +1,15 @@ +class CreateGames < ActiveRecord::Migration + def change + create_table :games do |t| + t.text :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.timestamps + end + end +end diff --git a/db/migrate/20140406171505_create_users.rb b/db/migrate/20140406171505_create_users.rb new file mode 100644 index 0000000..8032870 --- /dev/null +++ b/db/migrate/20140406171505_create_users.rb @@ -0,0 +1,13 @@ +class CreateUsers < ActiveRecord::Migration + def change + create_table :users do |t| + t.string :name + t.string :email + t.string :user_name + + t.timestamps + end + add_index :users, :email, unique: true + add_index :users, :user_name, unique: true + end +end diff --git a/db/migrate/20140406171508_create_sessions.rb b/db/migrate/20140406171508_create_sessions.rb new file mode 100644 index 0000000..f667f1e --- /dev/null +++ b/db/migrate/20140406171508_create_sessions.rb @@ -0,0 +1,11 @@ +class CreateSessions < ActiveRecord::Migration + def change + create_table :sessions do |t| + t.references :user, index: true + t.string :token + + t.timestamps + end + add_index :sessions, :token, unique: true + end +end diff --git a/db/migrate/20140406171510_create_server_settings.rb b/db/migrate/20140406171510_create_server_settings.rb new file mode 100644 index 0000000..dfdd91b --- /dev/null +++ b/db/migrate/20140406171510_create_server_settings.rb @@ -0,0 +1,8 @@ +class CreateServerSettings < ActiveRecord::Migration + def change + create_table :server_settings do |t| + + t.timestamps + end + end +end diff --git a/db/migrate/20140406171513_create_game_settings.rb b/db/migrate/20140406171513_create_game_settings.rb new file mode 100644 index 0000000..b1caf5d --- /dev/null +++ b/db/migrate/20140406171513_create_game_settings.rb @@ -0,0 +1,15 @@ +class CreateGameSettings < ActiveRecord::Migration + def change + create_table :game_settings do |t| + t.references :game, index: true + t.integer :stype + t.string :name + t.text :default + t.text :description + t.text :type_opt + t.integer :display_order + + t.timestamps + end + end +end diff --git a/db/migrate/20140406171516_create_tournament_preferences.rb b/db/migrate/20140406171516_create_tournament_preferences.rb new file mode 100644 index 0000000..991d659 --- /dev/null +++ b/db/migrate/20140406171516_create_tournament_preferences.rb @@ -0,0 +1,12 @@ +class CreateTournamentPreferences < ActiveRecord::Migration + def change + create_table :tournament_preferences do |t| + t.references :tournament, index: true + t.integer :vartype + t.string :name + t.text :value + + t.timestamps + end + end +end diff --git a/db/migrate/20140406171519_create_scores.rb b/db/migrate/20140406171519_create_scores.rb new file mode 100644 index 0000000..4ca0b0b --- /dev/null +++ b/db/migrate/20140406171519_create_scores.rb @@ -0,0 +1,11 @@ +class CreateScores < ActiveRecord::Migration + def change + create_table :scores do |t| + t.references :user, index: true + t.references :match, index: true + t.integer :value + + t.timestamps + end + end +end diff --git a/db/migrate/20140406171522_create_remote_usernames.rb b/db/migrate/20140406171522_create_remote_usernames.rb new file mode 100644 index 0000000..e265985 --- /dev/null +++ b/db/migrate/20140406171522_create_remote_usernames.rb @@ -0,0 +1,11 @@ +class CreateRemoteUsernames < ActiveRecord::Migration + def change + create_table :remote_usernames do |t| + t.references :game, index: true + t.references :user, index: true + t.text :json_value + + t.timestamps + end + end +end diff --git a/db/migrate/20140406171525_create_tournament_players_join_table.rb b/db/migrate/20140406171525_create_tournament_players_join_table.rb new file mode 100644 index 0000000..be240e8 --- /dev/null +++ b/db/migrate/20140406171525_create_tournament_players_join_table.rb @@ -0,0 +1,8 @@ +class CreateTournamentPlayersJoinTable < ActiveRecord::Migration + def change + create_join_table :players, :tournaments do |t| + # t.index [:player_id, :tournament_id] + # t.index [:tournament_id, :player_id] + end + end +end diff --git a/db/migrate/20140406171527_create_tournament_hosts_join_table.rb b/db/migrate/20140406171527_create_tournament_hosts_join_table.rb new file mode 100644 index 0000000..7521d89 --- /dev/null +++ b/db/migrate/20140406171527_create_tournament_hosts_join_table.rb @@ -0,0 +1,8 @@ +class CreateTournamentHostsJoinTable < ActiveRecord::Migration + def change + create_join_table :hosts, :tournaments do |t| + # t.index [:host_id, :tournament_id] + # t.index [:tournament_id, :host_id] + end + end +end diff --git a/db/migrate/20140406171530_create_team_user_join_table.rb b/db/migrate/20140406171530_create_team_user_join_table.rb new file mode 100644 index 0000000..f3b57fc --- /dev/null +++ b/db/migrate/20140406171530_create_team_user_join_table.rb @@ -0,0 +1,8 @@ +class CreateTeamUserJoinTable < ActiveRecord::Migration + def change + create_join_table :teams, :users do |t| + # t.index [:team_id, :user_id] + # t.index [:user_id, :team_id] + end + end +end diff --git a/db/migrate/20140406171532_create_match_team_join_table.rb b/db/migrate/20140406171532_create_match_team_join_table.rb new file mode 100644 index 0000000..c2ed1b7 --- /dev/null +++ b/db/migrate/20140406171532_create_match_team_join_table.rb @@ -0,0 +1,8 @@ +class CreateMatchTeamJoinTable < ActiveRecord::Migration + def change + create_join_table :matches, :teams do |t| + # t.index [:match_id, :team_id] + # t.index [:team_id, :match_id] + end + end +end diff --git a/db/migrate/20140406171543_add_hidden_attrs_to_user.rb b/db/migrate/20140406171543_add_hidden_attrs_to_user.rb new file mode 100644 index 0000000..9b5c505 --- /dev/null +++ b/db/migrate/20140406171543_add_hidden_attrs_to_user.rb @@ -0,0 +1,6 @@ +class AddHiddenAttrsToUser < ActiveRecord::Migration + def change + add_column :users, :password_digest, :string + add_column :users, :permissions, :integer + end +end diff --git a/db/schema.rb b/db/schema.rb index 829ad0e..53bc413 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: 20140406015417) do +ActiveRecord::Schema.define(version: 20140406171543) do create_table "alerts", force: true do |t| t.integer "author_id" @@ -115,6 +115,7 @@ ActiveRecord::Schema.define(version: 20140406015417) do end create_table "servers", force: true do |t| + t.integer "default_user_permissions" t.datetime "created_at" t.datetime "updated_at" end -- cgit v1.2.3-2-g168b From 2b5b1d4aba906bc5fb5b219a02a611b6b25253e3 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 6 Apr 2014 14:00:03 -0400 Subject: seed the server settings --- db/seeds.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'db') diff --git a/db/seeds.rb b/db/seeds.rb index 986256c..6efc3e7 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -6,6 +6,9 @@ # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) # Mayor.create(name: 'Emanuel', city: cities.first) # +p = User.permission_bits +Server.create(default_user_permissions: p[:join_tournament] | p[:create_pm]) + Game.create(name: "League of Legends",min_players_per_team: 5, max_players_per_team: 5, min_teams_per_match: 2, max_teams_per_match: 2, set_rounds: nil, randomized_teams: true) Game.create(name: "Chess", min_players_per_team: 1, max_players_per_team: 1, min_teams_per_match: 2, max_teams_per_match: 2, set_rounds: nil, randomized_teams: true) Game.create(name: "Hearthstone", min_players_per_team: 1, max_players_per_team: 1, min_teams_per_match: 2, max_teams_per_match: 2, set_rounds: 1, randomized_teams: false) -- cgit v1.2.3-2-g168b