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
189c2075
Commit
189c2075
authored
Jul 05, 2021
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a column to track when a project default branch changes
parent
132a369d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
0 deletions
+40
-0
db/migrate/20210705124128_add_project_settings_previous_default_branch.rb
...705124128_add_project_settings_previous_default_branch.rb
+20
-0
db/migrate/20210707173645_add_project_settings_previous_default_branch_text_limit.rb
...dd_project_settings_previous_default_branch_text_limit.rb
+15
-0
db/schema_migrations/20210705124128
db/schema_migrations/20210705124128
+1
-0
db/schema_migrations/20210707173645
db/schema_migrations/20210707173645
+1
-0
db/structure.sql
db/structure.sql
+2
-0
spec/requests/api/project_attributes.yml
spec/requests/api/project_attributes.yml
+1
-0
No files found.
db/migrate/20210705124128_add_project_settings_previous_default_branch.rb
0 → 100644
View file @
189c2075
# frozen_string_literal: true
class
AddProjectSettingsPreviousDefaultBranch
<
ActiveRecord
::
Migration
[
6.1
]
include
Gitlab
::
Database
::
MigrationHelpers
# rubocop:disable Migration/AddLimitToTextColumns
# limit is added in 20210707173645_add_project_settings_previous_default_branch_text_limit
def
up
with_lock_retries
do
add_column
:project_settings
,
:previous_default_branch
,
:text
end
end
# rubocop:enable Migration/AddLimitToTextColumns
def
down
with_lock_retries
do
remove_column
:project_settings
,
:previous_default_branch
end
end
end
db/migrate/20210707173645_add_project_settings_previous_default_branch_text_limit.rb
0 → 100644
View file @
189c2075
# frozen_string_literal: true
class
AddProjectSettingsPreviousDefaultBranchTextLimit
<
ActiveRecord
::
Migration
[
6.1
]
include
Gitlab
::
Database
::
MigrationHelpers
disable_ddl_transaction!
def
up
add_text_limit
:project_settings
,
:previous_default_branch
,
4096
end
def
down
remove_text_limit
:project_settings
,
:previous_default_branch
end
end
db/schema_migrations/20210705124128
0 → 100644
View file @
189c2075
02aea8fe759614bc3aa751e023aa508963f8183366f6d6f518bbccc2d85ec1a1
\ No newline at end of file
db/schema_migrations/20210707173645
0 → 100644
View file @
189c2075
e440dac0e14df7309c84e72b98ed6373c712901dc66310a474979e0fce7dc59c
\ No newline at end of file
db/structure.sql
View file @
189c2075
...
...
@@ -17081,6 +17081,8 @@ CREATE TABLE project_settings (
prevent_merge_without_jira_issue boolean DEFAULT false NOT NULL,
cve_id_request_enabled boolean DEFAULT true NOT NULL,
mr_default_target_self boolean DEFAULT false NOT NULL,
previous_default_branch text,
CONSTRAINT check_3a03e7557a CHECK ((char_length(previous_default_branch) <= 4096)),
CONSTRAINT check_bde223416c CHECK ((show_default_award_emojis IS NOT NULL))
);
spec/requests/api/project_attributes.yml
View file @
189c2075
...
...
@@ -137,6 +137,7 @@ project_setting:
-
has_confluence
-
has_vulnerabilities
-
prevent_merge_without_jira_issue
-
previous_default_branch
-
project_id
-
push_rule_id
-
show_default_award_emojis
...
...
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