diff --git a/db/migrate/20161011005219_set_minimal_and_maximal_times_for_all_event_types.rb b/db/migrate/20161011005219_set_minimal_and_maximal_times_for_all_event_types.rb new file mode 100644 index 0000000..5bf1185 --- /dev/null +++ b/db/migrate/20161011005219_set_minimal_and_maximal_times_for_all_event_types.rb @@ -0,0 +1,12 @@ +class EventType < ActiveRecord::Base +end + +class SetMinimalAndMaximalTimesForAllEventTypes < ActiveRecord::Migration + def up + EventType.where(minimum_length: nil).update_all(minimum_length: 0) + EventType.where(maximum_length: nil).update_all(maximum_length: 240) + end + + def down + end +end diff --git a/db/migrate/20161011005420_add_descriptions_for_all_events.rb b/db/migrate/20161011005420_add_descriptions_for_all_events.rb new file mode 100644 index 0000000..a8c018f --- /dev/null +++ b/db/migrate/20161011005420_add_descriptions_for_all_events.rb @@ -0,0 +1,11 @@ +class Event < ActiveRecord::Base +end + +class AddDescriptionsForAllEvents < ActiveRecord::Migration + def up + Event.where(description: [nil, '']).update_all(description: 'n/a') + end + + def down + end +end