diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-03-18 17:10:09 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-03-18 21:23:11 +0100 |
commit | 1793a65eeb2f75dd28c8f243e0b8acc0e7b0366b (patch) | |
tree | cdc9f47024e78ca32a84f7c49b68d39b974545af /db | |
parent | 17d40eab7f6669dc63e22574e05e5fbd4e92a4ad (diff) | |
download | gitlab-ce-1793a65eeb2f75dd28c8f243e0b8acc0e7b0366b.tar.gz |
Merge branch 'trigger-todo-for-mentions-on-commits-page' into 'master'
Trigger a todo for mentions on commits page
Closes #14006
* Screenshot:
![todo-commit](/uploads/5d34de0b7afcea7548123dafddf60c45/todo-commit.png)
See merge request !3262
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20160316192622_change_target_id_to_null_on_todos.rb | 5 | ||||
-rw-r--r-- | db/migrate/20160316204731_add_commit_id_to_todos.rb | 6 | ||||
-rw-r--r-- | db/schema.rb | 4 |
3 files changed, 14 insertions, 1 deletions
diff --git a/db/migrate/20160316192622_change_target_id_to_null_on_todos.rb b/db/migrate/20160316192622_change_target_id_to_null_on_todos.rb new file mode 100644 index 00000000000..6871b3920df --- /dev/null +++ b/db/migrate/20160316192622_change_target_id_to_null_on_todos.rb @@ -0,0 +1,5 @@ +class ChangeTargetIdToNullOnTodos < ActiveRecord::Migration + def change + change_column_null :todos, :target_id, true + end +end diff --git a/db/migrate/20160316204731_add_commit_id_to_todos.rb b/db/migrate/20160316204731_add_commit_id_to_todos.rb new file mode 100644 index 00000000000..ae19fdd1abd --- /dev/null +++ b/db/migrate/20160316204731_add_commit_id_to_todos.rb @@ -0,0 +1,6 @@ +class AddCommitIdToTodos < ActiveRecord::Migration + def change + add_column :todos, :commit_id, :string + add_index :todos, :commit_id + end +end diff --git a/db/schema.rb b/db/schema.rb index 7e6863ef47e..5b2f5aa3ddd 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -867,7 +867,7 @@ ActiveRecord::Schema.define(version: 20160316204731) do create_table "todos", force: :cascade do |t| t.integer "user_id", null: false t.integer "project_id", null: false - t.integer "target_id", null: false + t.integer "target_id" t.string "target_type", null: false t.integer "author_id" t.integer "action", null: false @@ -875,9 +875,11 @@ ActiveRecord::Schema.define(version: 20160316204731) do t.datetime "created_at" t.datetime "updated_at" t.integer "note_id" + t.string "commit_id" end add_index "todos", ["author_id"], name: "index_todos_on_author_id", using: :btree + add_index "todos", ["commit_id"], name: "index_todos_on_commit_id", using: :btree add_index "todos", ["note_id"], name: "index_todos_on_note_id", using: :btree add_index "todos", ["project_id"], name: "index_todos_on_project_id", using: :btree add_index "todos", ["state"], name: "index_todos_on_state", using: :btree |