diff options
author | George Koltsov <koltsov.george@gmail.com> | 2019-08-21 10:13:45 +0000 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2019-08-21 10:13:45 +0000 |
commit | 8bcc47ac02e69eb4564238b454ca8286a4126765 (patch) | |
tree | c1cfec9a502c619193909e363250f8e9089eb0a7 /db | |
parent | 2c4fa09b21303e637c2cf2cabd47d1737c70f21d (diff) | |
download | gitlab-ce-8bcc47ac02e69eb4564238b454ca8286a4126765.tar.gz |
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.rb | 13 | ||||
-rw-r--r-- | db/schema.rb | 1 |
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 |