summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-03-16 17:49:20 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-03-18 11:00:53 -0300
commit1e76245d4e8c5ecbd915c517b6c8923e9c4bbd2d (patch)
treea6569cd6e14152868e46c7487174e2a1e4eb87e4
parent42834095bc92aa2ebe2113a5655227ff0e2799e9 (diff)
downloadgitlab-ce-1e76245d4e8c5ecbd915c517b6c8923e9c4bbd2d.tar.gz
Add commit_id to todos
-rw-r--r--db/migrate/20160316204731_add_commit_id_to_todos.rb6
-rw-r--r--db/schema.rb2
2 files changed, 8 insertions, 0 deletions
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 cbec180844e..5b2f5aa3ddd 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -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