Feature: Support account/inbox specific webhooks (#562)

This commit is contained in:
Subin T P
2020-02-26 09:44:24 +05:30
committed by GitHub
parent 4d5e7b4adf
commit 7479b5db43
24 changed files with 117 additions and 57 deletions

View File

@@ -0,0 +1,5 @@
class RenameUrlsToUrl < ActiveRecord::Migration[6.0]
def change
rename_column :webhooks, :urls, :url
end
end

View File

@@ -0,0 +1,5 @@
class AddTypeToWebhook < ActiveRecord::Migration[6.0]
def change
add_column :webhooks, :webhook_type, :integer, default: '0'
end
end

View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2020_02_17_192734) do
ActiveRecord::Schema.define(version: 2020_02_25_162150) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -262,9 +262,10 @@ ActiveRecord::Schema.define(version: 2020_02_17_192734) do
create_table "webhooks", force: :cascade do |t|
t.integer "account_id"
t.integer "inbox_id"
t.string "urls"
t.string "url"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.integer "webhook_type", default: 0
end
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"