From e58600d1b9f1606a50d44858b6f596cd77b62212 Mon Sep 17 00:00:00 2001 From: Tanmay Deep Sharma <32020192+tds-1@users.noreply.github.com> Date: Tue, 6 Jan 2026 15:23:54 +0530 Subject: [PATCH] fix: the webhook url to be text (#13157) ## Description Change the url type from string to text, to support more than 255 characters Fixes # (issue) https://app.chatwoot.com/app/accounts/1/conversations/65240 ## Type of change Please delete options that are not relevant. - [ ] Bug fix (non-breaking change which fixes an issue) ## Checklist: - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules --- app/models/webhook.rb | 2 +- db/migrate/20251229081141_change_webhook_url_to_text.rb | 9 +++++++++ db/schema.rb | 4 ++-- 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 db/migrate/20251229081141_change_webhook_url_to_text.rb diff --git a/app/models/webhook.rb b/app/models/webhook.rb index 3fafb4354..1d61c1614 100644 --- a/app/models/webhook.rb +++ b/app/models/webhook.rb @@ -5,7 +5,7 @@ # id :bigint not null, primary key # name :string # subscriptions :jsonb -# url :string +# url :text # webhook_type :integer default("account_type") # created_at :datetime not null # updated_at :datetime not null diff --git a/db/migrate/20251229081141_change_webhook_url_to_text.rb b/db/migrate/20251229081141_change_webhook_url_to_text.rb new file mode 100644 index 000000000..633fd5b45 --- /dev/null +++ b/db/migrate/20251229081141_change_webhook_url_to_text.rb @@ -0,0 +1,9 @@ +class ChangeWebhookUrlToText < ActiveRecord::Migration[7.1] + def up + change_column :webhooks, :url, :text + end + + def down + change_column :webhooks, :url, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index 82dcd37f6..ebdcffed0 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 2025_11_19_161025) do +ActiveRecord::Schema[7.1].define(version: 2025_12_29_081141) do # These extensions should be enabled to support this database enable_extension "pg_stat_statements" enable_extension "pg_trgm" @@ -1239,7 +1239,7 @@ ActiveRecord::Schema[7.1].define(version: 2025_11_19_161025) do create_table "webhooks", force: :cascade do |t| t.integer "account_id" t.integer "inbox_id" - t.string "url" + t.text "url" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "webhook_type", default: 0