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/20170613154149_create_gpg_signatures.rb | |
parent | 786b5a5991930bb838767a4ed6eed2a67e517e82 (diff) |
use db's on_delete instead of has_many :dependent
Diffstat (limited to 'db/migrate/20170613154149_create_gpg_signatures.rb')
-rw-r--r-- | db/migrate/20170613154149_create_gpg_signatures.rb | 4 |
1 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 d1fe4b96a40..db86170776d 100644 --- a/db/migrate/20170613154149_create_gpg_signatures.rb +++ b/db/migrate/20170613154149_create_gpg_signatures.rb @@ -5,8 +5,8 @@ class CreateGpgSignatures < ActiveRecord::Migration create_table :gpg_signatures do |t| t.timestamps_with_timezone null: false - t.references :project, index: true, foreign_key: true - t.references :gpg_key, index: true, foreign_key: true + t.references :project, index: true, foreign_key: { on_delete: :cascade } + t.references :gpg_key, index: true, foreign_key: { on_delete: :nullify } t.boolean :valid_signature |