summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorRubén Dávila <ruben@gitlab.com>2017-10-04 10:34:50 -0500
committerRubén Dávila <ruben@gitlab.com>2017-10-05 08:26:02 -0500
commit2577cc99818bd0332aa78018de666579971341c8 (patch)
treefc1b4e38a6b63ca696cc966255d6fba7b7dfc9a9 /db/migrate
parent8be06f20fc64b027911ad75e05afaf0697444d6a (diff)
downloadgitlab-ce-2577cc99818bd0332aa78018de666579971341c8.tar.gz
Address some feedback from last code review
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20170927161718_create_gpg_key_subkeys.rb4
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