Add difficulty levels
This commit is contained in:
parent
4356616566
commit
5b35e25ecd
15 changed files with 119 additions and 3 deletions
12
db/migrate/20140212172244_create_difficulty_levels.rb
Normal file
12
db/migrate/20140212172244_create_difficulty_levels.rb
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
class CreateDifficultyLevels < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :difficulty_levels do |t|
|
||||
t.references :conference
|
||||
t.string :title
|
||||
t.text :description
|
||||
t.string :color, :default => "#ffffff"
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
class AddUseDifficultyLevelsToConference < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :conferences, :use_difficulty_levels, :boolean, :default => false
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
class AddDifficultyLevelIdToEvents < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :events, :difficulty_level_id, :integer
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue