feat: Business hour Inbox APIs (#1821)

* feat: Business hour Inbox APIs
This commit is contained in:
Sojan Jose
2021-02-23 12:11:15 +05:30
committed by GitHub
parent a3b0de63de
commit 0e721653e5
14 changed files with 86 additions and 23 deletions

View File

@@ -0,0 +1,11 @@
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

View File

@@ -0,0 +1,6 @@
class SwitchTimeZoneFromAccountToInbox < ActiveRecord::Migration[6.0]
def change
remove_column :accounts, :timezone, :string, default: 'UTC'
add_column :inboxes, :timezone, :string, default: 'UTC'
end
end