summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20140406131442_create_simple_captcha_data.rb (renamed from db/migrate/20140404212449_create_simple_captcha_data.rb)0
-rw-r--r--db/migrate/20140406171445_create_servers.rb (renamed from db/migrate/20140405012452_create_servers.rb)1
-rw-r--r--db/migrate/20140406171448_create_matches.rb (renamed from db/migrate/20140405012455_create_matches.rb)0
-rw-r--r--db/migrate/20140406171451_create_teams.rb (renamed from db/migrate/20140405012457_create_teams.rb)0
-rw-r--r--db/migrate/20140406171453_create_alerts.rb (renamed from db/migrate/20140405012500_create_alerts.rb)0
-rw-r--r--db/migrate/20140406171456_create_pms.rb (renamed from db/migrate/20140405012503_create_pms.rb)0
-rw-r--r--db/migrate/20140406171459_create_tournaments.rb (renamed from db/migrate/20140405012506_create_tournaments.rb)0
-rw-r--r--db/migrate/20140406171502_create_games.rb (renamed from db/migrate/20140405012508_create_games.rb)0
-rw-r--r--db/migrate/20140406171505_create_users.rb (renamed from db/migrate/20140405012510_create_users.rb)0
-rw-r--r--db/migrate/20140406171508_create_sessions.rb (renamed from db/migrate/20140405012513_create_sessions.rb)0
-rw-r--r--db/migrate/20140406171510_create_server_settings.rb (renamed from db/migrate/20140405012516_create_server_settings.rb)0
-rw-r--r--db/migrate/20140406171513_create_game_settings.rb (renamed from db/migrate/20140405012519_create_game_settings.rb)2
-rw-r--r--db/migrate/20140406171516_create_tournament_preferences.rb (renamed from db/migrate/20140405012521_create_tournament_preferences.rb)0
-rw-r--r--db/migrate/20140406171519_create_scores.rb (renamed from db/migrate/20140405012524_create_scores.rb)0
-rw-r--r--db/migrate/20140406171522_create_remote_usernames.rb (renamed from db/migrate/20140405012527_create_remote_usernames.rb)0
-rw-r--r--db/migrate/20140406171525_create_tournament_players_join_table.rb (renamed from db/migrate/20140405012529_create_tournament_players_join_table.rb)0
-rw-r--r--db/migrate/20140406171527_create_tournament_hosts_join_table.rb (renamed from db/migrate/20140405012532_create_tournament_hosts_join_table.rb)0
-rw-r--r--db/migrate/20140406171530_create_team_user_join_table.rb (renamed from db/migrate/20140405012535_create_team_user_join_table.rb)0
-rw-r--r--db/migrate/20140406171532_create_match_team_join_table.rb (renamed from db/migrate/20140405012537_create_match_team_join_table.rb)0
-rw-r--r--db/migrate/20140406171543_add_hidden_attrs_to_user.rb (renamed from db/migrate/20140405012548_add_hidden_attrs_to_user.rb)0
-rw-r--r--db/schema.rb5
-rw-r--r--db/seeds.rb3
22 files changed, 8 insertions, 3 deletions
diff --git a/db/migrate/20140404212449_create_simple_captcha_data.rb b/db/migrate/20140406131442_create_simple_captcha_data.rb
index 4573b20..4573b20 100644
--- a/db/migrate/20140404212449_create_simple_captcha_data.rb
+++ b/db/migrate/20140406131442_create_simple_captcha_data.rb
diff --git a/db/migrate/20140405012452_create_servers.rb b/db/migrate/20140406171445_create_servers.rb
index f33241a..fbe1b02 100644
--- a/db/migrate/20140405012452_create_servers.rb
+++ b/db/migrate/20140406171445_create_servers.rb
@@ -1,6 +1,7 @@
class CreateServers < ActiveRecord::Migration
def change
create_table :servers do |t|
+ t.integer :default_user_permissions
t.timestamps
end
diff --git a/db/migrate/20140405012455_create_matches.rb b/db/migrate/20140406171448_create_matches.rb
index 31eea12..31eea12 100644
--- a/db/migrate/20140405012455_create_matches.rb
+++ b/db/migrate/20140406171448_create_matches.rb
diff --git a/db/migrate/20140405012457_create_teams.rb b/db/migrate/20140406171451_create_teams.rb
index fdf9a68..fdf9a68 100644
--- a/db/migrate/20140405012457_create_teams.rb
+++ b/db/migrate/20140406171451_create_teams.rb
diff --git a/db/migrate/20140405012500_create_alerts.rb b/db/migrate/20140406171453_create_alerts.rb
index 68a8e10..68a8e10 100644
--- a/db/migrate/20140405012500_create_alerts.rb
+++ b/db/migrate/20140406171453_create_alerts.rb
diff --git a/db/migrate/20140405012503_create_pms.rb b/db/migrate/20140406171456_create_pms.rb
index 93bb5c6..93bb5c6 100644
--- a/db/migrate/20140405012503_create_pms.rb
+++ b/db/migrate/20140406171456_create_pms.rb
diff --git a/db/migrate/20140405012506_create_tournaments.rb b/db/migrate/20140406171459_create_tournaments.rb
index c0d8929..c0d8929 100644
--- a/db/migrate/20140405012506_create_tournaments.rb
+++ b/db/migrate/20140406171459_create_tournaments.rb
diff --git a/db/migrate/20140405012508_create_games.rb b/db/migrate/20140406171502_create_games.rb
index 5e4f56f..5e4f56f 100644
--- a/db/migrate/20140405012508_create_games.rb
+++ b/db/migrate/20140406171502_create_games.rb
diff --git a/db/migrate/20140405012510_create_users.rb b/db/migrate/20140406171505_create_users.rb
index 8032870..8032870 100644
--- a/db/migrate/20140405012510_create_users.rb
+++ b/db/migrate/20140406171505_create_users.rb
diff --git a/db/migrate/20140405012513_create_sessions.rb b/db/migrate/20140406171508_create_sessions.rb
index f667f1e..f667f1e 100644
--- a/db/migrate/20140405012513_create_sessions.rb
+++ b/db/migrate/20140406171508_create_sessions.rb
diff --git a/db/migrate/20140405012516_create_server_settings.rb b/db/migrate/20140406171510_create_server_settings.rb
index dfdd91b..dfdd91b 100644
--- a/db/migrate/20140405012516_create_server_settings.rb
+++ b/db/migrate/20140406171510_create_server_settings.rb
diff --git a/db/migrate/20140405012519_create_game_settings.rb b/db/migrate/20140406171513_create_game_settings.rb
index eed6b00..b1caf5d 100644
--- a/db/migrate/20140405012519_create_game_settings.rb
+++ b/db/migrate/20140406171513_create_game_settings.rb
@@ -2,7 +2,7 @@ class CreateGameSettings < ActiveRecord::Migration
def change
create_table :game_settings do |t|
t.references :game, index: true
- t.integer :type
+ t.integer :stype
t.string :name
t.text :default
t.text :description
diff --git a/db/migrate/20140405012521_create_tournament_preferences.rb b/db/migrate/20140406171516_create_tournament_preferences.rb
index 991d659..991d659 100644
--- a/db/migrate/20140405012521_create_tournament_preferences.rb
+++ b/db/migrate/20140406171516_create_tournament_preferences.rb
diff --git a/db/migrate/20140405012524_create_scores.rb b/db/migrate/20140406171519_create_scores.rb
index 4ca0b0b..4ca0b0b 100644
--- a/db/migrate/20140405012524_create_scores.rb
+++ b/db/migrate/20140406171519_create_scores.rb
diff --git a/db/migrate/20140405012527_create_remote_usernames.rb b/db/migrate/20140406171522_create_remote_usernames.rb
index e265985..e265985 100644
--- a/db/migrate/20140405012527_create_remote_usernames.rb
+++ b/db/migrate/20140406171522_create_remote_usernames.rb
diff --git a/db/migrate/20140405012529_create_tournament_players_join_table.rb b/db/migrate/20140406171525_create_tournament_players_join_table.rb
index be240e8..be240e8 100644
--- a/db/migrate/20140405012529_create_tournament_players_join_table.rb
+++ b/db/migrate/20140406171525_create_tournament_players_join_table.rb
diff --git a/db/migrate/20140405012532_create_tournament_hosts_join_table.rb b/db/migrate/20140406171527_create_tournament_hosts_join_table.rb
index 7521d89..7521d89 100644
--- a/db/migrate/20140405012532_create_tournament_hosts_join_table.rb
+++ b/db/migrate/20140406171527_create_tournament_hosts_join_table.rb
diff --git a/db/migrate/20140405012535_create_team_user_join_table.rb b/db/migrate/20140406171530_create_team_user_join_table.rb
index f3b57fc..f3b57fc 100644
--- a/db/migrate/20140405012535_create_team_user_join_table.rb
+++ b/db/migrate/20140406171530_create_team_user_join_table.rb
diff --git a/db/migrate/20140405012537_create_match_team_join_table.rb b/db/migrate/20140406171532_create_match_team_join_table.rb
index c2ed1b7..c2ed1b7 100644
--- a/db/migrate/20140405012537_create_match_team_join_table.rb
+++ b/db/migrate/20140406171532_create_match_team_join_table.rb
diff --git a/db/migrate/20140405012548_add_hidden_attrs_to_user.rb b/db/migrate/20140406171543_add_hidden_attrs_to_user.rb
index 9b5c505..9b5c505 100644
--- a/db/migrate/20140405012548_add_hidden_attrs_to_user.rb
+++ b/db/migrate/20140406171543_add_hidden_attrs_to_user.rb
diff --git a/db/schema.rb b/db/schema.rb
index c0d4fee..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: 20140405012548) do
+ActiveRecord::Schema.define(version: 20140406171543) 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"
@@ -115,6 +115,7 @@ ActiveRecord::Schema.define(version: 20140405012548) do
end
create_table "servers", force: true do |t|
+ t.integer "default_user_permissions"
t.datetime "created_at"
t.datetime "updated_at"
end
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)