Commit 3551a006 authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'add-experience-level-to-user-preferences' into 'master'

Add experience level to user preferences

See merge request gitlab-org/gitlab!32784
parents e5dadb8e 007c9917
...@@ -15,6 +15,8 @@ class UserPreference < ApplicationRecord ...@@ -15,6 +15,8 @@ class UserPreference < ApplicationRecord
less_than_or_equal_to: Gitlab::TabWidth::MAX 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 :tab_width, value: Gitlab::TabWidth::DEFAULT, allows_nil: false
default_value_for :timezone, value: Time.zone.tzinfo.name, 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 default_value_for :time_display_relative, value: true, allows_nil: false
......
---
title: Add experience_level to user_preferences
merge_request: 32784
author:
type: added
# 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
...@@ -6711,7 +6711,8 @@ CREATE TABLE public.user_preferences ( ...@@ -6711,7 +6711,8 @@ CREATE TABLE public.user_preferences (
setup_for_company boolean, setup_for_company boolean,
render_whitespace_in_code boolean, render_whitespace_in_code boolean,
tab_width smallint, tab_width smallint,
feature_filter_type bigint feature_filter_type bigint,
experience_level smallint
); );
CREATE SEQUENCE public.user_preferences_id_seq CREATE SEQUENCE public.user_preferences_id_seq
...@@ -13951,6 +13952,7 @@ COPY "schema_migrations" (version) FROM STDIN; ...@@ -13951,6 +13952,7 @@ COPY "schema_migrations" (version) FROM STDIN;
20200519171058 20200519171058
20200519194042 20200519194042
20200520103514 20200520103514
20200521022725
20200525114553 20200525114553
20200525121014 20200525121014
20200526120714 20200526120714
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment