diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2017-05-25 13:26:12 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2017-05-25 13:26:12 +0000 |
commit | 1ed7b7629a2c0fbcdfeeda386ec6292e57728e74 (patch) | |
tree | 4cd07f47a698bedf1a5811480482bfaa1582a5ae /db | |
parent | 78de1c059ac588df4ba1ef352b28e5b1c6102804 (diff) | |
parent | 330789c23c777d8ca646eba7c25f39cb7342cdee (diff) | |
download | gitlab-ce-1ed7b7629a2c0fbcdfeeda386ec6292e57728e74.tar.gz |
Merge branch '17848-web-hook-logging' into 'master'
Implement Web Hooks calls logging
Closes #17848
See merge request !11027
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20170427103502_create_web_hook_logs.rb | 22 | ||||
-rw-r--r-- | db/schema.rb | 18 |
2 files changed, 40 insertions, 0 deletions
diff --git a/db/migrate/20170427103502_create_web_hook_logs.rb b/db/migrate/20170427103502_create_web_hook_logs.rb new file mode 100644 index 00000000000..3643c52180c --- /dev/null +++ b/db/migrate/20170427103502_create_web_hook_logs.rb @@ -0,0 +1,22 @@ +# rubocop:disable all +class CreateWebHookLogs < ActiveRecord::Migration + DOWNTIME = false + + def change + create_table :web_hook_logs do |t| + t.references :web_hook, null: false, index: true, foreign_key: { on_delete: :cascade } + + t.string :trigger + t.string :url + t.text :request_headers + t.text :request_data + t.text :response_headers + t.text :response_body + t.string :response_status + t.float :execution_duration + t.string :internal_error_message + + t.timestamps null: false + end + end +end diff --git a/db/schema.rb b/db/schema.rb index ca33c8cc2a2..f6b513a5725 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1391,6 +1391,23 @@ ActiveRecord::Schema.define(version: 20170523091700) do add_index "users_star_projects", ["project_id"], name: "index_users_star_projects_on_project_id", using: :btree add_index "users_star_projects", ["user_id", "project_id"], name: "index_users_star_projects_on_user_id_and_project_id", unique: true, using: :btree + create_table "web_hook_logs", force: :cascade do |t| + t.integer "web_hook_id", null: false + t.string "trigger" + t.string "url" + t.text "request_headers" + t.text "request_data" + t.text "response_headers" + t.text "response_body" + t.string "response_status" + t.float "execution_duration" + t.string "internal_error_message" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "web_hook_logs", ["web_hook_id"], name: "index_web_hook_logs_on_web_hook_id", using: :btree + create_table "web_hooks", force: :cascade do |t| t.string "url", limit: 2000 t.integer "project_id" @@ -1454,4 +1471,5 @@ ActiveRecord::Schema.define(version: 20170523091700) do add_foreign_key "timelogs", "merge_requests", name: "fk_timelogs_merge_requests_merge_request_id", on_delete: :cascade add_foreign_key "trending_projects", "projects", on_delete: :cascade add_foreign_key "u2f_registrations", "users" + add_foreign_key "web_hook_logs", "web_hooks", on_delete: :cascade end |