mirror of
https://github.com/internetee/registry.git
synced 2025-06-06 04:37:30 +02:00
Migrations from rails app:update
This commit is contained in:
parent
75fc8ba74f
commit
97db4fe4f9
1 changed files with 10 additions and 0 deletions
|
@ -0,0 +1,10 @@
|
||||||
|
# This migration comes from active_storage (originally 20180723000244)
|
||||||
|
class AddForeignKeyConstraintToActiveStorageAttachmentsForBlobId < ActiveRecord::Migration[6.0]
|
||||||
|
def up
|
||||||
|
return if foreign_key_exists?(:active_storage_attachments, column: :blob_id)
|
||||||
|
|
||||||
|
if table_exists?(:active_storage_blobs)
|
||||||
|
add_foreign_key :active_storage_attachments, :active_storage_blobs, column: :blob_id
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Add table
Add a link
Reference in a new issue