diff options
| author | Douwe Maan <douwe@selenight.nl> | 2016-08-17 12:14:44 -0500 |
|---|---|---|
| committer | Douwe Maan <douwe@selenight.nl> | 2016-08-17 12:16:46 -0500 |
| commit | 4a13aa9f34ab4114bc485e1ca8fa0db8daa0394b (patch) | |
| tree | 17554a901009603f52be08914636495b06db2e68 /db | |
| parent | f3acf9fd248a16665a114bf6cce761e9277c2d5b (diff) | |
| download | gitlab-ce-4a13aa9f34ab4114bc485e1ca8fa0db8daa0394b.tar.gz | |
Store discussion_id on Note for faster discussion lookup.
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrate/20160817154936_add_discussion_ids_to_notes.rb | 13 | ||||
| -rw-r--r-- | db/schema.rb | 6 |
2 files changed, 17 insertions, 2 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 diff --git a/db/schema.rb b/db/schema.rb index 8d8555528b8..0bc1c967af3 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20160810142633) do +ActiveRecord::Schema.define(version: 20160817154936) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -663,7 +663,7 @@ ActiveRecord::Schema.define(version: 20160810142633) do t.string "line_code" t.string "commit_id" t.integer "noteable_id" - t.boolean "system", default: false, null: false + t.boolean "system", default: false, null: false t.text "st_diff" t.integer "updated_by_id" t.string "type" @@ -671,6 +671,8 @@ ActiveRecord::Schema.define(version: 20160810142633) do t.text "original_position" t.datetime "resolved_at" t.integer "resolved_by_id" + t.string "discussion_id" + t.string "original_discussion_id" end add_index "notes", ["author_id"], name: "index_notes_on_author_id", using: :btree |
