Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
aac228bb
Commit
aac228bb
authored
Jan 14, 2020
by
Małgorzata Ksionek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add migration and feature in licence
Add migration that adds new settings to application settings
parent
6a1ec074
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
0 deletions
+40
-0
db/migrate/20200114140305_add_fields_to_application_settings_for_merge_requests_approvals.rb
...s_to_application_settings_for_merge_requests_approvals.rb
+33
-0
db/schema.rb
db/schema.rb
+3
-0
ee/app/helpers/ee/application_settings_helper.rb
ee/app/helpers/ee/application_settings_helper.rb
+3
-0
ee/app/models/license.rb
ee/app/models/license.rb
+1
-0
No files found.
db/migrate/20200114140305_add_fields_to_application_settings_for_merge_requests_approvals.rb
0 → 100644
View file @
aac228bb
# frozen_string_literal: true
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class
AddFieldsToApplicationSettingsForMergeRequestsApprovals
<
ActiveRecord
::
Migration
[
5.2
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_column_with_default
(
:application_settings
,
:disable_overriding_approvers_per_merge_request
,
:boolean
,
default:
false
,
allow_null:
false
)
add_column_with_default
(
:application_settings
,
:prevent_merge_requests_author_approval
,
:boolean
,
default:
false
,
allow_null:
false
)
add_column_with_default
(
:application_settings
,
:prevent_merge_requests_committers_approval
,
:boolean
,
default:
false
,
allow_null:
false
)
end
def
down
remove_column
(
:application_settings
,
:disable_overriding_approvers_per_merge_request
)
remove_column
(
:application_settings
,
:prevent_merge_requests_author_approval
)
remove_column
(
:application_settings
,
:prevent_merge_requests_committers_approval
)
end
end
db/schema.rb
View file @
aac228bb
...
...
@@ -346,6 +346,9 @@ ActiveRecord::Schema.define(version: 2020_02_12_052620) do
t
.
integer
"elasticsearch_indexed_field_length_limit"
,
default:
0
,
null:
false
t
.
integer
"elasticsearch_max_bulk_size_mb"
,
limit:
2
,
default:
10
,
null:
false
t
.
integer
"elasticsearch_max_bulk_concurrency"
,
limit:
2
,
default:
10
,
null:
false
t
.
boolean
"disable_overriding_approvers_per_merge_request"
,
default:
false
,
null:
false
t
.
boolean
"prevent_merge_requests_author_approval"
,
default:
false
,
null:
false
t
.
boolean
"prevent_merge_requests_committers_approval"
,
default:
false
,
null:
false
t
.
index
[
"custom_project_templates_group_id"
],
name:
"index_application_settings_on_custom_project_templates_group_id"
t
.
index
[
"file_template_project_id"
],
name:
"index_application_settings_on_file_template_project_id"
t
.
index
[
"instance_administration_project_id"
],
name:
"index_applicationsettings_on_instance_administration_project_id"
...
...
ee/app/helpers/ee/application_settings_helper.rb
View file @
aac228bb
...
...
@@ -93,6 +93,9 @@ module EE
default_project_deletion_protection
deletion_adjourned_period
updating_name_disabled_for_users
disable_overriding_approvers_per_merge_request
prevent_merge_requests_author_approval
prevent_merge_requests_committers_approval
]
end
end
...
...
ee/app/models/license.rb
View file @
aac228bb
...
...
@@ -80,6 +80,7 @@ class License < ApplicationRecord
ldap_group_sync_filter
merge_pipelines
merge_request_performance_metrics
merge_request_approvers_rules
merge_trains
metrics_reports
multiple_approval_rules
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment