diff options
author | Phil Hughes <me@iamphill.com> | 2018-05-30 07:38:31 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-05-30 07:38:31 +0000 |
commit | fd79df64c5411308e67a62b4c02a07f5317ddec1 (patch) | |
tree | 8f923668b4abebc14cba1923acdd7700a8f3ba96 /db | |
parent | e869387ca27f9a9ac34f6398876714199fc3100e (diff) | |
parent | 4cff66a6c46361e8d775ea3f5a80bf147d4020b3 (diff) | |
download | gitlab-ce-fd79df64c5411308e67a62b4c02a07f5317ddec1.tar.gz |
Merge branch 'blackst0ne-squash-and-merge-in-gitlab-core-ce' into 'master'
Resolve "Squash and merge in GitLab Core (CE)"
Closes #34591
See merge request gitlab-org/gitlab-ce!18956
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20180515005612_add_squash_to_merge_requests.rb | 19 | ||||
-rw-r--r-- | db/schema.rb | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/db/migrate/20180515005612_add_squash_to_merge_requests.rb b/db/migrate/20180515005612_add_squash_to_merge_requests.rb new file mode 100644 index 00000000000..f526b45bd4b --- /dev/null +++ b/db/migrate/20180515005612_add_squash_to_merge_requests.rb @@ -0,0 +1,19 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class AddSquashToMergeRequests < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + disable_ddl_transaction! + + DOWNTIME = false + + def up + unless column_exists?(:merge_requests, :squash) + add_column_with_default :merge_requests, :squash, :boolean, default: false, allow_null: false + end + end + + def down + remove_column :merge_requests, :squash if column_exists?(:merge_requests, :squash) + end +end diff --git a/db/schema.rb b/db/schema.rb index 932b7f8da02..42fea8e4380 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1217,6 +1217,7 @@ ActiveRecord::Schema.define(version: 20180529093006) do t.integer "latest_merge_request_diff_id" t.string "rebase_commit_sha" t.boolean "allow_maintainer_to_push" + t.boolean "squash", default: false, null: false end add_index "merge_requests", ["assignee_id"], name: "index_merge_requests_on_assignee_id", using: :btree |