summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorThijs Wouters <thijs@morewood.be>2016-03-14 10:46:26 +0100
committerAlfredo Sumaran <alfredo@gitlab.com>2016-06-06 11:59:49 -0500
commitd8263b285193d9163089683eb77825f1cd673b14 (patch)
tree4ecdabc6af9a09556fdb212488d381b43d20ae10 /db
parent0e2f26dd2a10ed876f96b0496dff2de6780eeaea (diff)
downloadgitlab-ce-d8263b285193d9163089683eb77825f1cd673b14.tar.gz
Sort by label priority
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20160314094147_add_priority_to_label.rb6
-rw-r--r--db/schema.rb2
2 files changed, 8 insertions, 0 deletions
diff --git a/db/migrate/20160314094147_add_priority_to_label.rb b/db/migrate/20160314094147_add_priority_to_label.rb
new file mode 100644
index 00000000000..8ddf7782972
--- /dev/null
+++ b/db/migrate/20160314094147_add_priority_to_label.rb
@@ -0,0 +1,6 @@
+class AddPriorityToLabel < ActiveRecord::Migration
+ def change
+ add_column :labels, :priority, :integer
+ add_index :labels, :priority
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 9b991f347a9..69e37470de0 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -496,8 +496,10 @@ ActiveRecord::Schema.define(version: 20160530150109) do
t.datetime "updated_at"
t.boolean "template", default: false
t.string "description"
+ t.integer "priority"
end
+ add_index "labels", ["priority"], name: "index_labels_on_priority", using: :btree
add_index "labels", ["project_id"], name: "index_labels_on_project_id", using: :btree
create_table "lfs_objects", force: :cascade do |t|