Sha256: 86afeb520923f91b7da650b02e03371492a61800d4826314446083450db21f3b

Contents?: true

Size: 826 Bytes

Versions: 50

Compression:

Stored size: 826 Bytes

Contents

class CopyFilenamesOfProcessingFailedImages < ActiveRecord::Migration[5.2]
  def up
    execute(<<-SQL)
      UPDATE pageflow_image_files
         SET attachment_on_s3_file_name = unprocessed_attachment_file_name,
             attachment_on_s3_content_type = unprocessed_attachment_content_type,
             attachment_on_s3_file_size = unprocessed_attachment_file_size,
             attachment_on_s3_updated_at = unprocessed_attachment_updated_at
       WHERE state = 'processing_failed';
    SQL
  end

  def down
    execute(<<-SQL)
      UPDATE pageflow_image_files
         SET attachment_on_s3_file_name = NULL,
             attachment_on_s3_content_type = NULL,
             attachment_on_s3_file_size = NULL,
             attachment_on_s3_updated_at = NULL
       WHERE state = 'processing_failed';
    SQL
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
pageflow-17.0.4 db/migrate/20190404075934_copy_filenames_of_processing_failed_images.rb
pageflow-17.0.3 db/migrate/20190404075934_copy_filenames_of_processing_failed_images.rb
pageflow-17.0.2 db/migrate/20190404075934_copy_filenames_of_processing_failed_images.rb
pageflow-17.0.1 db/migrate/20190404075934_copy_filenames_of_processing_failed_images.rb
pageflow-17.0.0 db/migrate/20190404075934_copy_filenames_of_processing_failed_images.rb
pageflow-16.2.0 db/migrate/20190404075934_copy_filenames_of_processing_failed_images.rb
pageflow-16.1.0 db/migrate/20190404075934_copy_filenames_of_processing_failed_images.rb
pageflow-16.0.0 db/migrate/20190404075934_copy_filenames_of_processing_failed_images.rb
pageflow-15.8.0 db/migrate/20190404075934_copy_filenames_of_processing_failed_images.rb
pageflow-14.5.2 db/migrate/20190404075934_copy_filenames_of_processing_failed_images.rb
pageflow-15.7.1 db/migrate/20190404075934_copy_filenames_of_processing_failed_images.rb
pageflow-15.7.0 db/migrate/20190404075934_copy_filenames_of_processing_failed_images.rb
pageflow-15.6.1 db/migrate/20190404075934_copy_filenames_of_processing_failed_images.rb
pageflow-15.6.0 db/migrate/20190404075934_copy_filenames_of_processing_failed_images.rb
pageflow-15.5.0 db/migrate/20190404075934_copy_filenames_of_processing_failed_images.rb
pageflow-15.4.0 db/migrate/20190404075934_copy_filenames_of_processing_failed_images.rb
pageflow-15.3.0 db/migrate/20190404075934_copy_filenames_of_processing_failed_images.rb
pageflow-15.2.2 db/migrate/20190404075934_copy_filenames_of_processing_failed_images.rb
pageflow-15.2.1 db/migrate/20190404075934_copy_filenames_of_processing_failed_images.rb
pageflow-15.2.0 db/migrate/20190404075934_copy_filenames_of_processing_failed_images.rb