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
007c9917
Commit
007c9917
authored
May 28, 2020
by
Dallas Reedy
Committed by
Peter Leitzen
May 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add experience level to user preferences
parent
4f3da9a5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
1 deletion
+19
-1
app/models/user_preference.rb
app/models/user_preference.rb
+2
-0
changelogs/unreleased/add-experience-level-to-user-preferences.yml
...s/unreleased/add-experience-level-to-user-preferences.yml
+5
-0
db/migrate/20200521022725_add_experience_level_to_user_preferences.rb
...0200521022725_add_experience_level_to_user_preferences.rb
+9
-0
db/structure.sql
db/structure.sql
+3
-1
No files found.
app/models/user_preference.rb
View file @
007c9917
...
...
@@ -15,6 +15,8 @@ class UserPreference < ApplicationRecord
less_than_or_equal_to:
Gitlab
::
TabWidth
::
MAX
}
enum
experience_level:
{
novice:
0
,
experienced:
1
}
default_value_for
:tab_width
,
value:
Gitlab
::
TabWidth
::
DEFAULT
,
allows_nil:
false
default_value_for
:timezone
,
value:
Time
.
zone
.
tzinfo
.
name
,
allows_nil:
false
default_value_for
:time_display_relative
,
value:
true
,
allows_nil:
false
...
...
changelogs/unreleased/add-experience-level-to-user-preferences.yml
0 → 100644
View file @
007c9917
---
title
:
Add experience_level to user_preferences
merge_request
:
32784
author
:
type
:
added
db/migrate/20200521022725_add_experience_level_to_user_preferences.rb
0 → 100644
View file @
007c9917
# frozen_string_literal: true
class
AddExperienceLevelToUserPreferences
<
ActiveRecord
::
Migration
[
6.0
]
DOWNTIME
=
false
def
change
add_column
:user_preferences
,
:experience_level
,
:integer
,
limit:
2
end
end
db/structure.sql
View file @
007c9917
...
...
@@ -6711,7 +6711,8 @@ CREATE TABLE public.user_preferences (
setup_for_company
boolean
,
render_whitespace_in_code
boolean
,
tab_width
smallint
,
feature_filter_type
bigint
feature_filter_type
bigint
,
experience_level
smallint
);
CREATE
SEQUENCE
public
.
user_preferences_id_seq
...
...
@@ -13951,6 +13952,7 @@ COPY "schema_migrations" (version) FROM STDIN;
20200519171058
20200519194042
20200520103514
20200521022725
20200525114553
20200525121014
20200526120714
...
...
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