summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorJason Goodman <jgoodman@gitlab.com>2019-04-26 21:08:41 +0000
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2019-04-26 21:08:41 +0000
commitfe86890b9d7a720648e7570d227c438d6ca7f25a (patch)
tree1c583b22cea6404de37ae6217f320d93cdf7cde9 /db
parent265b789476479c29ea88db174aca1d80ddf24358 (diff)
downloadgitlab-ce-fe86890b9d7a720648e7570d227c438d6ca7f25a.tar.gz
Add deployment events to chat notification services
This enables sending a chat message to Slack or Mattermost upon a successful, failed, or canceled deployment
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20190426180107_add_deployment_events_to_services.rb17
-rw-r--r--db/schema.rb3
2 files changed, 19 insertions, 1 deletions
diff --git a/db/migrate/20190426180107_add_deployment_events_to_services.rb b/db/migrate/20190426180107_add_deployment_events_to_services.rb
new file mode 100644
index 00000000000..1fb137fb5f9
--- /dev/null
+++ b/db/migrate/20190426180107_add_deployment_events_to_services.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddDeploymentEventsToServices < ActiveRecord::Migration[5.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_column_with_default(:services, :deployment_events, :boolean, default: false, allow_null: false)
+ end
+
+ def down
+ remove_column(:services, :deployment_events)
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 23566a31a9d..a38c07a491e 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20190422082247) do
+ActiveRecord::Schema.define(version: 20190426180107) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -1999,6 +1999,7 @@ ActiveRecord::Schema.define(version: 20190422082247) do
t.boolean "commit_events", default: true, null: false
t.boolean "job_events", default: false, null: false
t.boolean "confidential_note_events", default: true
+ t.boolean "deployment_events", default: false, null: false
t.index ["project_id"], name: "index_services_on_project_id", using: :btree
t.index ["template"], name: "index_services_on_template", using: :btree
t.index ["type"], name: "index_services_on_type", using: :btree