summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorEzekiel Kigbo <ekigbo@gitlab.com>2019-05-07 21:58:16 +0000
committerFatih Acet <acetfatih@gmail.com>2019-05-07 21:58:16 +0000
commit3ad6653b3e64ad81278cbbc24dacd15bd2d32e6f (patch)
treed481264c2003dd5f26da4f61da413d19db96c057 /db
parent9d4450263fd7dc53dafd62389871d8b1fcea5e1a (diff)
downloadgitlab-ce-3ad6653b3e64ad81278cbbc24dacd15bd2d32e6f.tar.gz
Added user time settings fields to profile
Udpated user_edit_profile_spec with time preferences Minor update form fields
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20190325105715_add_fields_to_user_preferences.rb24
-rw-r--r--db/schema.rb3
2 files changed, 27 insertions, 0 deletions
diff --git a/db/migrate/20190325105715_add_fields_to_user_preferences.rb b/db/migrate/20190325105715_add_fields_to_user_preferences.rb
new file mode 100644
index 00000000000..9ea3b4f9cd8
--- /dev/null
+++ b/db/migrate/20190325105715_add_fields_to_user_preferences.rb
@@ -0,0 +1,24 @@
+# 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 AddFieldsToUserPreferences < ActiveRecord::Migration[5.0]
+ include Gitlab::Database::MigrationHelpers
+
+ disable_ddl_transaction!
+
+ DOWNTIME = false
+
+ def up
+ add_column(:user_preferences, :timezone, :string)
+ add_column(:user_preferences, :time_display_relative, :boolean)
+ add_column(:user_preferences, :time_format_in_24h, :boolean)
+ end
+
+ def down
+ remove_column(:user_preferences, :timezone)
+ remove_column(:user_preferences, :time_display_relative)
+ remove_column(:user_preferences, :time_format_in_24h)
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index deaf406fe3d..1be3afd5282 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -2246,6 +2246,9 @@ ActiveRecord::Schema.define(version: 20190506135400) do
t.integer "first_day_of_week"
t.string "issues_sort"
t.string "merge_requests_sort"
+ t.string "timezone"
+ t.boolean "time_display_relative"
+ t.boolean "time_format_in_24h"
t.index ["user_id"], name: "index_user_preferences_on_user_id", unique: true, using: :btree
end