diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-20 17:33:44 +0300 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-27 16:46:03 +0300 |
commit | 57ccff8ea41aa2366f40b29187d3b8d1217264e0 (patch) | |
tree | 720c3a7457fffa96d9985bf004f303d57ff839fb /db/migrate/20170222111732_create_gpg_keys.rb | |
parent | 786b5a5991930bb838767a4ed6eed2a67e517e82 (diff) |
use db's on_delete instead of has_many :dependent
Diffstat (limited to 'db/migrate/20170222111732_create_gpg_keys.rb')
-rw-r--r-- | db/migrate/20170222111732_create_gpg_keys.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20170222111732_create_gpg_keys.rb b/db/migrate/20170222111732_create_gpg_keys.rb index 7591238311f..072c0819b2f 100644 --- a/db/migrate/20170222111732_create_gpg_keys.rb +++ b/db/migrate/20170222111732_create_gpg_keys.rb @@ -5,7 +5,7 @@ class CreateGpgKeys < ActiveRecord::Migration create_table :gpg_keys do |t| t.timestamps_with_timezone null: false - t.references :user, index: true, foreign_key: true + t.references :user, index: true, foreign_key: { on_delete: :cascade } t.binary :primary_keyid, limit: Gitlab::Database.mysql? ? 20 : nil t.binary :fingerprint, limit: Gitlab::Database.mysql? ? 20 : nil |