Sha256: 21555fa7baa58e443e5d9f7bcf49452774829eff8e78b268c7424a2459de62a7

Contents?: true

Size: 292 Bytes

Versions: 3

Compression:

Stored size: 292 Bytes

Contents

class AddForeignKeyConstraintToActiveStorageAttachmentsForBlobId < ActiveRecord::Migration[6.0]
  def up
    unless foreign_key_exists?(:active_storage_attachments, column: :blob_id)
      add_foreign_key :active_storage_attachments, :active_storage_blobs, column: :blob_id
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
activestorage-6.0.0.beta3 db/update_migrate/20180723000244_add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.rb
activestorage-6.0.0.beta2 db/update_migrate/20180723000244_add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.rb
activestorage-6.0.0.beta1 db/update_migrate/20180723000244_add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.rb