summaryrefslogtreecommitdiff
path: root/db/migrate/20140424014433_create_games.rb
diff options
context:
space:
mode:
authorDavisLWebb <davislwebb@ymail.com>2014-04-23 21:47:34 -0400
committerDavisLWebb <davislwebb@ymail.com>2014-04-23 21:47:34 -0400
commit8003c0f8326f231b6e0c8bb29feb48736271ea21 (patch)
treeec0fcef385cac365f6a0f2c3f348ef8a3d65d090 /db/migrate/20140424014433_create_games.rb
parent8010bd28db76dd5783b2be046de4c63fa27738f6 (diff)
parentcfa41fcc58acc9ae50b84eb51e3d9fa9ecb3b79e (diff)
Merge branch 'clean2'
Conflicts: app/models/game.rb
Diffstat (limited to 'db/migrate/20140424014433_create_games.rb')
-rw-r--r--db/migrate/20140424014433_create_games.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/db/migrate/20140424014433_create_games.rb b/db/migrate/20140424014433_create_games.rb
new file mode 100644
index 0000000..23edf0b
--- /dev/null
+++ b/db/migrate/20140424014433_create_games.rb
@@ -0,0 +1,18 @@
+class CreateGames < ActiveRecord::Migration
+ def change
+ create_table :games do |t|
+ t.references :parent, index: true
+ 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