summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-16 09:06:25 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-16 09:06:25 +0000
commitd8211a0ed119eada7d292e974a8fc7b0cd982d3c (patch)
treea14bfca83dd6b71144959d7e7a6d058f5d8922a5 /db
parentedd042071d1b5e6f494881dc2d9c39b46e42f74b (diff)
downloadgitlab-ce-d8211a0ed119eada7d292e974a8fc7b0cd982d3c.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20190907184714_add_show_whitespace_in_diffs_to_user_preferences.rb20
-rw-r--r--db/schema.rb1
2 files changed, 21 insertions, 0 deletions
diff --git a/db/migrate/20190907184714_add_show_whitespace_in_diffs_to_user_preferences.rb b/db/migrate/20190907184714_add_show_whitespace_in_diffs_to_user_preferences.rb
new file mode 100644
index 00000000000..50d5d2b0574
--- /dev/null
+++ b/db/migrate/20190907184714_add_show_whitespace_in_diffs_to_user_preferences.rb
@@ -0,0 +1,20 @@
+# 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 AddShowWhitespaceInDiffsToUserPreferences < ActiveRecord::Migration[5.2]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_column_with_default :user_preferences, :show_whitespace_in_diffs, :boolean, default: true, allow_null: false
+ end
+
+ def down
+ remove_column :user_preferences, :show_whitespace_in_diffs
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 95069f711fb..64d29d7cc05 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -3478,6 +3478,7 @@ ActiveRecord::Schema.define(version: 2019_09_12_061145) do
t.boolean "time_display_relative"
t.boolean "time_format_in_24h"
t.string "projects_sort", limit: 64
+ t.boolean "show_whitespace_in_diffs", default: true, null: false
t.index ["user_id"], name: "index_user_preferences_on_user_id", unique: true
end