From 135d8a0dc100f10ffa57fb4ed877fc1cc29c7608 Mon Sep 17 00:00:00 2001 From: Eugeniu Tambur Date: Tue, 19 Mar 2019 13:16:57 +0100 Subject: =?UTF-8?q?Traducir=20del:=20ingle=CC=81s=2044/5000=20Checking=20f?= =?UTF-8?q?or=20the=20existence=20of=20only=20one=20table?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ..._foreign_key_constraint_to_active_storage_attachments_for_blob_id.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activestorage') 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 -- cgit v1.2.3