diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-26 09:30:33 +0200 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-27 15:46:04 +0200 |
commit | 4e53131f7dceb001368446ef3e7eb3747cfcec02 (patch) | |
tree | 922f4fdb0f766b864673aa3096b9ef44b7719656 /db | |
parent | fef030c23dff6f3b11b0e6bfd4c9443106375de1 (diff) | |
download | gitlab-ce-4e53131f7dceb001368446ef3e7eb3747cfcec02.tar.gz |
add unique index for gpg_signatures#commit_sha
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20170613154149_create_gpg_signatures.rb | 2 | ||||
-rw-r--r-- | db/schema.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/db/migrate/20170613154149_create_gpg_signatures.rb b/db/migrate/20170613154149_create_gpg_signatures.rb index 775a9463914..f6b5e7ebb7b 100644 --- a/db/migrate/20170613154149_create_gpg_signatures.rb +++ b/db/migrate/20170613154149_create_gpg_signatures.rb @@ -16,7 +16,7 @@ class CreateGpgSignatures < ActiveRecord::Migration t.text :gpg_key_user_name t.text :gpg_key_user_email - t.index :commit_sha, length: Gitlab::Database.mysql? ? 20 : nil + t.index :commit_sha, unique: true, length: Gitlab::Database.mysql? ? 20 : nil t.index :gpg_key_primary_keyid, length: Gitlab::Database.mysql? ? 20 : nil end end diff --git a/db/schema.rb b/db/schema.rb index 2cc8b1624c0..63030350c5d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -565,7 +565,7 @@ ActiveRecord::Schema.define(version: 20170725145659) do t.text "gpg_key_user_email" end - add_index "gpg_signatures", ["commit_sha"], name: "index_gpg_signatures_on_commit_sha", using: :btree + add_index "gpg_signatures", ["commit_sha"], name: "index_gpg_signatures_on_commit_sha", unique: true, using: :btree add_index "gpg_signatures", ["gpg_key_id"], name: "index_gpg_signatures_on_gpg_key_id", using: :btree add_index "gpg_signatures", ["gpg_key_primary_keyid"], name: "index_gpg_signatures_on_gpg_key_primary_keyid", using: :btree add_index "gpg_signatures", ["project_id"], name: "index_gpg_signatures_on_project_id", using: :btree |