Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-12-02 23:33:43 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-12-04 15:37:17 +0400
commit169b4ce0ca2ef04d37deb6bdb054cb8124a9db61 (patch)
tree4b9fcf02f4966df39270ea146b7f12772fcd3ba5
parent88bab75aa43b6e1abc71bade2a350b0aa1abc722 (diff)
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>
-rw-r--r--db/migrate/20131202192556_add_event_fields_for_web_hook.rb7
-rw-r--r--db/schema.rb11
2 files changed, 14 insertions, 4 deletions
diff --git a/db/migrate/20131202192556_add_event_fields_for_web_hook.rb b/db/migrate/20131202192556_add_event_fields_for_web_hook.rb
new file mode 100644
index 00000000000..d29e996852e
--- /dev/null
+++ b/db/migrate/20131202192556_add_event_fields_for_web_hook.rb
@@ -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
diff --git a/db/schema.rb b/db/schema.rb
index 24d2fef4a19..6219ce77696 100644
--- a/db/schema.rb
+++ b/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"