Adding more registration options, and starting work on supporter levels

This commit is contained in:
Matt Barringer 2013-02-02 16:43:47 +01:00
parent 61a02d17a3
commit 973913b3bf
25 changed files with 228 additions and 20 deletions

View file

@ -0,0 +1,5 @@
class AddDietaryChoiceToConferences < ActiveRecord::Migration
def change
add_column :conferences, :use_dietary_choices, :boolean, :default => false
end
end

View file

@ -0,0 +1,13 @@
class CreateDietaryChoicesTable < ActiveRecord::Migration
def up
create_table :dietary_choices do |t|
t.references :conference
t.string :title, :null => false
t.timestamps
end
end
def down
drop_table :dietary_choices
end
end

View file

@ -0,0 +1,5 @@
class AddDietaryChoiceToRegistration < ActiveRecord::Migration
def change
add_column :registrations, :dietary_choice_id, :integer
end
end

View file

@ -0,0 +1,5 @@
class AddDietaryTextToRegistration < ActiveRecord::Migration
def change
add_column :registrations, :other_dietary_choice, :text
end
end

View file

@ -0,0 +1,5 @@
class AddHandicappedAccessToRegistrations < ActiveRecord::Migration
def change
add_column :registrations, :handicapped_access_required, :boolean, :default => false
end
end

View file

@ -0,0 +1,13 @@
class CreateSupporterLevelTable < ActiveRecord::Migration
def up
create_table :supporter_levels do |t|
t.references :conference
t.string :title, :null => false
t.string :url
end
end
def down
drop_table :supporter_levels
end
end

View file

@ -0,0 +1,15 @@
class CreateTableSupporterRegistrations < ActiveRecord::Migration
def up
create_table :supporter_registrations do |t|
t.references :registration
t.references :supporter_level
t.string :email
t.string :code
t.boolean :code_is_valid, :default => false
end
end
def down
drop_table :supporter_registrations
end
end

View file

@ -0,0 +1,5 @@
class AddUseSupporterLevelsToConferences < ActiveRecord::Migration
def change
add_column :conferences, :use_supporter_levels, :boolean, :default => false
end
end