feat: Business hour Inbox APIs (#1821)
* feat: Business hour Inbox APIs
This commit is contained in:
11
db/migrate/20210222131048_change_working_hours_to_zero.rb
Normal file
11
db/migrate/20210222131048_change_working_hours_to_zero.rb
Normal 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
|
||||
@@ -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
|
||||
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2021_02_19_085719) do
|
||||
ActiveRecord::Schema.define(version: 2021_02_22_131155) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pg_stat_statements"
|
||||
@@ -50,7 +50,6 @@ ActiveRecord::Schema.define(version: 2021_02_19_085719) do
|
||||
t.integer "settings_flags", default: 0, null: false
|
||||
t.integer "feature_flags", default: 0, null: false
|
||||
t.integer "auto_resolve_duration"
|
||||
t.string "timezone", default: "UTC"
|
||||
end
|
||||
|
||||
create_table "action_mailbox_inbound_emails", force: :cascade do |t|
|
||||
@@ -303,6 +302,7 @@ ActiveRecord::Schema.define(version: 2021_02_19_085719) do
|
||||
t.string "email_address"
|
||||
t.boolean "working_hours_enabled", default: false
|
||||
t.string "out_of_office_message"
|
||||
t.string "timezone", default: "UTC"
|
||||
t.index ["account_id"], name: "index_inboxes_on_account_id"
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user