Chatwoot/db/migrate/20210222131048_change_working_hours_to_zero.rb
Sojan Jose 0e721653e5
feat: Business hour Inbox APIs (#1821)
* feat: Business hour Inbox APIs
2021-02-23 12:11:15 +05:30

11 lines
324 B
Ruby

class ChangeWorkingHoursToZero < ActiveRecord::Migration[6.0]
# rubocop:disable Rails/SkipsModelValidations
def up
WorkingHour.where(day_of_week: 7).update_all(day_of_week: 0)
end
def down
WorkingHour.where(day_of_week: 0).update_all(day_of_week: 7)
end
# rubocop:enable Rails/SkipsModelValidations
end