Merge branch 'develop' into feat/voice-as-twilio-capability

This commit is contained in:
Muhsin Keloth
2026-04-06 14:04:33 +04:00
committed by GitHub
32 changed files with 273 additions and 28 deletions
@@ -0,0 +1,5 @@
class AddSecretToAgentBots < ActiveRecord::Migration[7.1]
def change
add_column :agent_bots, :secret, :string
end
end
@@ -0,0 +1,5 @@
class AddSecretToChannelApi < ActiveRecord::Migration[7.1]
def change
add_column :channel_api, :secret, :string
end
end
@@ -0,0 +1,15 @@
class BackfillAgentBotAndChannelApiSecrets < ActiveRecord::Migration[7.1]
def up
AgentBot.where(secret: nil).find_each do |agent_bot|
agent_bot.update!(secret: SecureRandom.urlsafe_base64(24))
end
Channel::Api.where(secret: nil).find_each do |channel|
channel.update!(secret: SecureRandom.urlsafe_base64(24))
end
end
def down
# no-op: removing the columns in the previous migrations handles cleanup
end
end
+2
View File
@@ -131,6 +131,7 @@ ActiveRecord::Schema[7.1].define(version: 2026_03_26_120001) do
t.bigint "account_id"
t.integer "bot_type", default: 0
t.jsonb "bot_config", default: {}
t.string "secret"
t.index ["account_id"], name: "index_agent_bots_on_account_id"
end
@@ -413,6 +414,7 @@ ActiveRecord::Schema[7.1].define(version: 2026_03_26_120001) do
t.string "hmac_token"
t.boolean "hmac_mandatory", default: false
t.jsonb "additional_attributes", default: {}
t.string "secret"
t.index ["hmac_token"], name: "index_channel_api_on_hmac_token", unique: true
t.index ["identifier"], name: "index_channel_api_on_identifier", unique: true
end