Commit 5e55b8ac authored by Alexis Reigel's avatar Alexis Reigel
Browse files

add unique indexes to gpg_keys

parent 9faaf3eed5f6
......@@ -12,7 +12,8 @@
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 @@
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|
......
Supports Markdown
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