Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGeorge Koltsov <koltsov.george@gmail.com>2019-08-21 13:13:45 +0300
committerKamil TrzciƄski <ayufan@ayufan.eu>2019-08-21 13:13:45 +0300
commit8bcc47ac02e69eb4564238b454ca8286a4126765 (patch)
treec1cfec9a502c619193909e363250f8e9089eb0a7 /db
parent2c4fa09b21303e637c2cf2cabd47d1737c70f21d (diff)
Add SortingPreference concern
Sorting preference functionality has been extracted from `IssuableCollections` to a new `SortingPreference` concern in order to reuse this functionality in projects (and groups in the future).
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20190808152507_add_projects_sorting_field_to_user_preferences.rb13
-rw-r--r--db/schema.rb1
2 files changed, 14 insertions, 0 deletions
diff --git a/db/migrate/20190808152507_add_projects_sorting_field_to_user_preferences.rb b/db/migrate/20190808152507_add_projects_sorting_field_to_user_preferences.rb
new file mode 100644
index 00000000000..941fead655e
--- /dev/null
+++ b/db/migrate/20190808152507_add_projects_sorting_field_to_user_preferences.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class AddProjectsSortingFieldToUserPreferences < ActiveRecord::Migration[5.2]
+ DOWNTIME = false
+
+ def up
+ add_column :user_preferences, :projects_sort, :string, limit: 64
+ end
+
+ def down
+ remove_column :user_preferences, :projects_sort
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index ce5fd38129a..3f7917654cf 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -3411,6 +3411,7 @@ ActiveRecord::Schema.define(version: 2019_08_15_093949) do
t.string "epics_sort"
t.integer "roadmap_epics_state"
t.string "roadmaps_sort"
+ t.string "projects_sort", limit: 64
t.index ["user_id"], name: "index_user_preferences_on_user_id", unique: true
end