diff options
author | Rubén Dávila <ruben@gitlab.com> | 2017-10-04 18:34:50 +0300 |
---|---|---|
committer | Rubén Dávila <ruben@gitlab.com> | 2017-10-05 16:26:02 +0300 |
commit | 2577cc99818bd0332aa78018de666579971341c8 (patch) | |
tree | fc1b4e38a6b63ca696cc966255d6fba7b7dfc9a9 /db/migrate/20170927161718_create_gpg_key_subkeys.rb | |
parent | 8be06f20fc64b027911ad75e05afaf0697444d6a (diff) |
Address some feedback from last code review
Diffstat (limited to 'db/migrate/20170927161718_create_gpg_key_subkeys.rb')
-rw-r--r-- | db/migrate/20170927161718_create_gpg_key_subkeys.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/db/migrate/20170927161718_create_gpg_key_subkeys.rb b/db/migrate/20170927161718_create_gpg_key_subkeys.rb index ffe06ce1231..c03c40416a8 100644 --- a/db/migrate/20170927161718_create_gpg_key_subkeys.rb +++ b/db/migrate/20170927161718_create_gpg_key_subkeys.rb @@ -3,11 +3,11 @@ class CreateGpgKeySubkeys < ActiveRecord::Migration def up create_table :gpg_key_subkeys do |t| + t.references :gpg_key, null: false, index: true, foreign_key: { on_delete: :cascade } + t.binary :keyid t.binary :fingerprint - t.references :gpg_key, null: false, index: true, foreign_key: { on_delete: :cascade } - t.index :keyid, unique: true, length: Gitlab::Database.mysql? ? 20 : nil t.index :fingerprint, unique: true, length: Gitlab::Database.mysql? ? 20 : nil end |