diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-11-14 19:30:01 -0200 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-11-18 15:17:51 -0200 |
commit | d399e1ae2b92bc399962a286fddc59eaa09670a7 (patch) | |
tree | ea30c59e125b8086cbe5939ef58f03ba3051f872 /db | |
parent | 88479f7f3071c2d79447896deeea63fb78b175df (diff) | |
download | gitlab-ce-d399e1ae2b92bc399962a286fddc59eaa09670a7.tar.gz |
Allow enabling and disabling commit and MR events for JIRAissue_5541
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20161118183841_add_commit_events_to_services.rb | 15 | ||||
-rw-r--r-- | db/schema.rb | 3 |
2 files changed, 17 insertions, 1 deletions
diff --git a/db/migrate/20161118183841_add_commit_events_to_services.rb b/db/migrate/20161118183841_add_commit_events_to_services.rb new file mode 100644 index 00000000000..4f9b5dd2281 --- /dev/null +++ b/db/migrate/20161118183841_add_commit_events_to_services.rb @@ -0,0 +1,15 @@ +class AddCommitEventsToServices < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_column_with_default(:services, :commit_events, :boolean, default: true, allow_null: false) + end + + def down + remove_column(:services, :commit_events) + end +end diff --git a/db/schema.rb b/db/schema.rb index 19bd6b63acb..b098392581b 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20161117114805) do +ActiveRecord::Schema.define(version: 20161118183841) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -1023,6 +1023,7 @@ ActiveRecord::Schema.define(version: 20161117114805) do t.boolean "wiki_page_events", default: true t.boolean "pipeline_events", default: false, null: false t.boolean "confidential_issues_events", default: true, null: false + t.boolean "commit_events", default: true, null: false end add_index "services", ["project_id"], name: "index_services_on_project_id", using: :btree |