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: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
88bab75aa4
commit
169b4ce0ca
2 changed files with 14 additions and 4 deletions
|
@ -0,0 +1,7 @@
|
|||
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
db/schema.rb
11
db/schema.rb
|
@ -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
|
||||
|
@ -334,10 +334,13 @@ ActiveRecord::Schema.define(:version => 20131112220935) do
|
|||
create_table "web_hooks", :force => true do |t|
|
||||
t.string "url"
|
||||
t.integer "project_id"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.string "type", :default => "ProjectHook"
|
||||
t.datetime "created_at", :null => false
|
||||
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"
|
||||
|
|
Loading…
Reference in a new issue