summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-08-17 12:14:44 -0500
committerDouwe Maan <douwe@selenight.nl>2016-08-17 12:16:46 -0500
commit4a13aa9f34ab4114bc485e1ca8fa0db8daa0394b (patch)
tree17554a901009603f52be08914636495b06db2e68 /db/migrate
parentf3acf9fd248a16665a114bf6cce761e9277c2d5b (diff)
downloadgitlab-ce-4a13aa9f34ab4114bc485e1ca8fa0db8daa0394b.tar.gz
Store discussion_id on Note for faster discussion lookup.
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20160817154936_add_discussion_ids_to_notes.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/db/migrate/20160817154936_add_discussion_ids_to_notes.rb b/db/migrate/20160817154936_add_discussion_ids_to_notes.rb
new file mode 100644
index 00000000000..61facce665a
--- /dev/null
+++ b/db/migrate/20160817154936_add_discussion_ids_to_notes.rb
@@ -0,0 +1,13 @@
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class AddDiscussionIdsToNotes < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ add_column :notes, :discussion_id, :string
+ add_column :notes, :original_discussion_id, :string
+ end
+end