2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/migrations/005_create_tournaments.rb', line 2
def up
create_table(:tournament_participations, :ignore_index_errors=>true) do
primary_key :id
TrueClass :eliminated
Integer :racer_id, :null=>false
Integer :tournament_id, :null=>false
index [:racer_id], :name=>:index_tournament_participations_racer
index [:tournament_id], :name=>:index_tournament_participations_tournament
end
create_table(:tournaments) do
primary_key :id
String :name, :size=> 140
end
end
|