add unique indexes to gpg_keys
This commit is contained in:
parent
07dbd5649a
commit
14551424c9
2 changed files with 4 additions and 2 deletions
|
@ -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|
|
||||
|
|
Loading…
Reference in a new issue