diff options
author | Robert Speicher <robert@gitlab.com> | 2016-08-16 23:51:35 +0300 |
---|---|---|
committer | Ruben Davila <rdavila84@gmail.com> | 2016-08-19 23:39:56 +0300 |
commit | cd8489105ba0b3c6a4ffa06cd80829128723e0c5 (patch) | |
tree | aa975cf25b7b70b4fb2e706e67110e312451bd34 /db | |
parent | 24477045f0ade0f758d180b6ed15818eb2cbfaa2 (diff) |
Merge branch 'pipeline-hooks-without-slack' into 'master'
Implement pipeline hooks, extracted from !5525
Closes #20115
See merge request !5620
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20160728081025_add_pipeline_events_to_web_hooks.rb | 16 | ||||
-rw-r--r-- | db/migrate/20160728103734_add_pipeline_events_to_services.rb | 16 | ||||
-rw-r--r-- | db/schema.rb | 2 |
3 files changed, 34 insertions, 0 deletions
diff --git a/db/migrate/20160728081025_add_pipeline_events_to_web_hooks.rb b/db/migrate/20160728081025_add_pipeline_events_to_web_hooks.rb new file mode 100644 index 00000000000..b800e6d7283 --- /dev/null +++ b/db/migrate/20160728081025_add_pipeline_events_to_web_hooks.rb @@ -0,0 +1,16 @@ +class AddPipelineEventsToWebHooks < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_column_with_default(:web_hooks, :pipeline_events, :boolean, + default: false, allow_null: false) + end + + def down + remove_column(:web_hooks, :pipeline_events) + end +end diff --git a/db/migrate/20160728103734_add_pipeline_events_to_services.rb b/db/migrate/20160728103734_add_pipeline_events_to_services.rb new file mode 100644 index 00000000000..bcd24fe1566 --- /dev/null +++ b/db/migrate/20160728103734_add_pipeline_events_to_services.rb @@ -0,0 +1,16 @@ +class AddPipelineEventsToServices < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_column_with_default(:services, :pipeline_events, :boolean, + default: false, allow_null: false) + end + + def down + remove_column(:services, :pipeline_events) + end +end diff --git a/db/schema.rb b/db/schema.rb index eba7698307f..748c4adc889 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -924,6 +924,7 @@ ActiveRecord::Schema.define(version: 20160818205718) do t.string "category", default: "common", null: false t.boolean "default", default: false t.boolean "wiki_page_events", default: true + t.boolean "pipeline_events", default: false, null: false end add_index "services", ["project_id"], name: "index_services_on_project_id", using: :btree @@ -1138,6 +1139,7 @@ ActiveRecord::Schema.define(version: 20160818205718) do t.boolean "build_events", default: false, null: false t.boolean "wiki_page_events", default: false, null: false t.string "token" + t.boolean "pipeline_events", default: false, null: false end add_index "web_hooks", ["project_id"], name: "index_web_hooks_on_project_id", using: :btree |