2019-12-06 18:30:58 +00:00
|
|
|
class CreateActiveStorageVariantRecords < ActiveRecord::Migration[6.0]
|
2019-12-06 03:21:24 +00:00
|
|
|
def up
|
|
|
|
create_table :active_storage_variant_records do |t|
|
|
|
|
t.belongs_to :blob, null: false, index: false
|
|
|
|
t.string :variation_digest, null: false
|
|
|
|
|
|
|
|
t.index %i[ blob_id variation_digest ], name: "index_active_storage_variant_records_uniqueness", unique: true
|
|
|
|
t.foreign_key :active_storage_blobs, column: :blob_id
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|