summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20170210103609_add_index_to_user_agent_detail.rb14
-rw-r--r--db/schema.rb2
2 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/20170210103609_add_index_to_user_agent_detail.rb b/db/migrate/20170210103609_add_index_to_user_agent_detail.rb
new file mode 100644
index 00000000000..c01753cfbd2
--- /dev/null
+++ b/db/migrate/20170210103609_add_index_to_user_agent_detail.rb
@@ -0,0 +1,14 @@
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class AddIndexToUserAgentDetail < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def change
+ add_concurrent_index(:user_agent_details, [:subject_id, :subject_type])
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index e0208dab3d3..88aaa6c3c55 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -1218,6 +1218,8 @@ ActiveRecord::Schema.define(version: 20170215200045) do
t.datetime "updated_at", null: false
end
+ add_index "user_agent_details", ["subject_id", "subject_type"], name: "index_user_agent_details_on_subject_id_and_subject_type", using: :btree
+
create_table "users", force: :cascade do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false