aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage
diff options
context:
space:
mode:
authorEugeniu Tambur <eugeniu.rtj@gmail.com>2019-03-19 13:16:57 +0100
committerEugeniu Tambur <eugeniu.rtj@gmail.com>2019-03-19 13:16:57 +0100
commit135d8a0dc100f10ffa57fb4ed877fc1cc29c7608 (patch)
treee25c18549057427a8ef66ffb0a8453d165e64730 /activestorage
parent417c625ab210ecfd6bb555fbec891fb9c3a40736 (diff)
downloadrails-135d8a0dc100f10ffa57fb4ed877fc1cc29c7608.tar.gz
rails-135d8a0dc100f10ffa57fb4ed877fc1cc29c7608.tar.bz2
rails-135d8a0dc100f10ffa57fb4ed877fc1cc29c7608.zip
Traducir del: ingleĢs
44/5000 Checking for the existence of only one table
Diffstat (limited to 'activestorage')
-rw-r--r--activestorage/db/update_migrate/20180723000244_add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activestorage/db/update_migrate/20180723000244_add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.rb b/activestorage/db/update_migrate/20180723000244_add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.rb
index 844577d9c8..5472e3c87b 100644
--- a/activestorage/db/update_migrate/20180723000244_add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.rb
+++ b/activestorage/db/update_migrate/20180723000244_add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.rb
@@ -2,7 +2,7 @@ class AddForeignKeyConstraintToActiveStorageAttachmentsForBlobId < ActiveRecord:
def up
return if foreign_key_exists?(:active_storage_attachments, column: :blob_id)
- if table_exists?(:active_storage_attachments) && table_exists?(:active_storage_blobs)
+ if table_exists?(:active_storage_blobs)
add_foreign_key :active_storage_attachments, :active_storage_blobs, column: :blob_id
end
end