20200627125810_add_thumbnail_columns_to_media_attachments.rb 372 B

12345678910111213
  1. # frozen_string_literal: true
  2. class AddThumbnailColumnsToMediaAttachments < ActiveRecord::Migration[5.2]
  3. def up
  4. add_attachment :media_attachments, :thumbnail
  5. add_column :media_attachments, :thumbnail_remote_url, :string
  6. end
  7. def down
  8. remove_attachment :media_attachments, :thumbnail
  9. remove_column :media_attachments, :thumbnail_remote_url
  10. end
  11. end