Commit 169b4ce0 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add new fields to web_hooks table.

Next fields were added:
* push_events
* issues_events
* merge_requests_events

Main goal is to create web hooks that can be triggered only for certain
event types. For example you can have separate web hook for push events
and another one for issues.
Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 88bab75a
class AddEventFieldsForWebHook < ActiveRecord::Migration
def change
add_column :web_hooks, :push_events, :boolean, default: true, null: false
add_column :web_hooks, :issues_events, :boolean, default: false, null: false
add_column :web_hooks, :merge_requests_events, :boolean, default: false, null: false
end
end
......@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20131112220935) do
ActiveRecord::Schema.define(:version => 20131202192556) do
create_table "broadcast_messages", :force => true do |t|
t.text "message", :null => false
......@@ -338,6 +338,9 @@ ActiveRecord::Schema.define(:version => 20131112220935) do
t.datetime "updated_at", :null => false
t.string "type", :default => "ProjectHook"
t.integer "service_id"
t.boolean "push_events", :default => true, :null => false
t.boolean "issues_events", :default => false, :null => false
t.boolean "merge_requests_events", :default => false, :null => false
end
add_index "web_hooks", ["project_id"], :name => "index_web_hooks_on_project_id"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment