Adding social events, which can be used on the registration page

This commit is contained in:
Matt Barringer 2013-02-16 13:30:53 +01:00
parent ba721772b9
commit 3933e89a9c
14 changed files with 112 additions and 6 deletions

View file

@ -0,0 +1,14 @@
class CreateSocialEventsTable < ActiveRecord::Migration
def up
create_table :social_events do |t|
t.references :conference
t.string :title
t.text :description
t.date :date
end
end
def down
drop_table :social_events
end
end

View file

@ -0,0 +1,11 @@
class CreateRegistrationsSocialEventsTable < ActiveRecord::Migration
def up
create_table :registrations_social_events, :id => false do |t|
t.references :registration, :social_event
end
end
def down
drop_table :registrations_social_events
end
end

View file

@ -0,0 +1,8 @@
class SetRegistrationDefaultsToFalse < ActiveRecord::Migration
def up
change_column :registrations, :using_affiliated_lodging, :boolean, :default => false
end
def down
end
end

View file

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

View file

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20130211170728) do
ActiveRecord::Schema.define(:version => 20130216122417) do
create_table "call_for_papers", :force => true do |t|
t.date "start_date", :null => false
@ -168,7 +168,7 @@ ActiveRecord::Schema.define(:version => 20130211170728) do
t.integer "conference_id"
t.boolean "attending_social_events", :default => true
t.boolean "attending_with_partner", :default => false
t.boolean "using_affiliated_lodging", :default => true
t.boolean "using_affiliated_lodging", :default => false
t.datetime "arrival"
t.datetime "departure"
t.text "additional_speakers"
@ -177,6 +177,12 @@ ActiveRecord::Schema.define(:version => 20130211170728) do
t.integer "dietary_choice_id"
t.text "other_dietary_choice"
t.boolean "handicapped_access_required", :default => false
t.text "other_special_needs"
end
create_table "registrations_social_events", :id => false, :force => true do |t|
t.integer "registration_id"
t.integer "social_event_id"
end
create_table "roles", :force => true do |t|
@ -198,6 +204,13 @@ ActiveRecord::Schema.define(:version => 20130211170728) do
t.boolean "public", :default => true
end
create_table "social_events", :force => true do |t|
t.integer "conference_id"
t.string "title"
t.text "description"
t.date "date"
end
create_table "supporter_levels", :force => true do |t|
t.integer "conference_id"
t.string "title", :null => false