Add enabled to event_schedules

To show scheduled events that have been cancelled/withdrawn as 'cancelled', and consequently also show when an event is their replacement.

admin/schedules#show does not show events that were scheduled and then cancelled/withdrawn, however a record in event_schedules exists for those events, but event_schedule.enabled = false
This commit is contained in:
Stella Rouzi 2017-02-12 17:57:55 +02:00 committed by James Mason
parent 4409610a89
commit 4289f699ac
6 changed files with 35 additions and 2 deletions

View file

@ -0,0 +1,5 @@
class AddEnabledToEventSchedules < ActiveRecord::Migration
def change
add_column :event_schedules, :enabled, :boolean, default: true
end
end

View file

@ -217,6 +217,7 @@ ActiveRecord::Schema.define(version: 20171130172334) do
t.datetime "start_time"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.boolean "enabled", default: true
t.index ["event_id", "schedule_id"], name: "index_event_schedules_on_event_id_and_schedule_id", unique: true
t.index ["event_id"], name: "index_event_schedules_on_event_id"
t.index ["room_id"], name: "index_event_schedules_on_room_id"
@ -494,7 +495,7 @@ ActiveRecord::Schema.define(version: 20171130172334) do
t.integer "user_id"
t.integer "payment_id"
t.integer "week"
t.float "amount_paid", default: 0.0
t.float "amount_paid"
end
create_table "ticket_scannings", force: :cascade do |t|