Commit 14551424 authored by Alexis Reigel's avatar Alexis Reigel

add unique indexes to gpg_keys

parent 07dbd564
......@@ -12,7 +12,8 @@ class CreateGpgKeys < ActiveRecord::Migration
t.text :key
t.index :primary_keyid, length: Gitlab::Database.mysql? ? 20 : nil
t.index :primary_keyid, unique: true, length: Gitlab::Database.mysql? ? 20 : nil
t.index :fingerprint, unique: true, length: Gitlab::Database.mysql? ? 20 : nil
end
end
end
......@@ -549,7 +549,8 @@ ActiveRecord::Schema.define(version: 20170725145659) do
t.text "key"
end
add_index "gpg_keys", ["primary_keyid"], name: "index_gpg_keys_on_primary_keyid", using: :btree
add_index "gpg_keys", ["fingerprint"], name: "index_gpg_keys_on_fingerprint", unique: true, using: :btree
add_index "gpg_keys", ["primary_keyid"], name: "index_gpg_keys_on_primary_keyid", unique: true, using: :btree
add_index "gpg_keys", ["user_id"], name: "index_gpg_keys_on_user_id", using: :btree
create_table "gpg_signatures", force: :cascade do |t|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment