diff options
author | Rui Anderson <anderson.rui@gmail.com> | 2016-04-27 15:34:42 -0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-06-10 14:36:54 +0200 |
commit | 07dbd6b3884c4f188b2c3f29dd7419791f1051eb (patch) | |
tree | 6c00e4b9097f62a89fcd6f506a9c7b3eb27231bc /db | |
parent | cfc99bbd1390bc548a703fdc7857c7db5b0e7c13 (diff) | |
download | gitlab-ce-07dbd6b3884c4f188b2c3f29dd7419791f1051eb.tar.gz |
Allow or not merge MR with failed build
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20160419122101_add_only_allow_merge_if_build_succeeds_to_projects.rb | 15 | ||||
-rw-r--r-- | db/schema.rb | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/20160419122101_add_only_allow_merge_if_build_succeeds_to_projects.rb b/db/migrate/20160419122101_add_only_allow_merge_if_build_succeeds_to_projects.rb new file mode 100644 index 00000000000..69d64ccd006 --- /dev/null +++ b/db/migrate/20160419122101_add_only_allow_merge_if_build_succeeds_to_projects.rb @@ -0,0 +1,15 @@ +class AddOnlyAllowMergeIfBuildSucceedsToProjects < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + disable_ddl_transaction! + + def up + add_column_with_default(:projects, + :only_allow_merge_if_build_succeeds, + :boolean, + default: false) + end + + def down + remove_column(:projects, :only_allow_merge_if_build_succeeds) + end +end diff --git a/db/schema.rb b/db/schema.rb index b7adf48fdb4..03070f0d593 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -779,6 +779,7 @@ ActiveRecord::Schema.define(version: 20160608155312) do t.boolean "last_repository_check_failed" t.datetime "last_repository_check_at" t.boolean "container_registry_enabled" + t.boolean "only_allow_merge_if_build_succeeds", default: false end add_index "projects", ["builds_enabled", "shared_runners_enabled"], name: "index_projects_on_builds_enabled_and_shared_runners_enabled", using: :btree |