Sha256: ca4dc7132ae60ec2d7562a52e73fee0e859a8f4cc6c5611c656fd53a3d5d2e74

Contents?: true

Size: 267 Bytes

Versions: 40

Compression:

Stored size: 267 Bytes

Contents

class DorsaleAlexandrieAttachmentsAddName < ActiveRecord::Migration
  def change
    add_column :dorsale_alexandrie_attachments, :name, :string

    Dorsale::Alexandrie::Attachment.all.each do |a|
      a.update_attributes!(name: a.file_identifier)
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
dorsale-3.0.3 db/migrate/20151126132304_dorsale_alexandrie_attachments_add_name.rb
dorsale-3.0.2 db/migrate/20151126132304_dorsale_alexandrie_attachments_add_name.rb
dorsale-3.0.1 db/migrate/20151126132304_dorsale_alexandrie_attachments_add_name.rb
dorsale-3.0.0 db/migrate/20151126132304_dorsale_alexandrie_attachments_add_name.rb
dorsale-2.7.3 db/migrate/20151126132304_dorsale_alexandrie_attachments_add_name.rb
dorsale-2.7.2 db/migrate/20151126132304_dorsale_alexandrie_attachments_add_name.rb
dorsale-2.7.1 db/migrate/20151126132304_dorsale_alexandrie_attachments_add_name.rb
dorsale-2.7.0 db/migrate/20151126132304_dorsale_alexandrie_attachments_add_name.rb
dorsale-2.6.8 db/migrate/20151126132304_dorsale_alexandrie_attachments_add_name.rb
dorsale-2.6.7 db/migrate/20151126132304_dorsale_alexandrie_attachments_add_name.rb
dorsale-2.6.6 db/migrate/20151126132304_dorsale_alexandrie_attachments_add_name.rb
dorsale-2.6.5 db/migrate/20151126132304_dorsale_alexandrie_attachments_add_name.rb
dorsale-2.6.4 db/migrate/20151126132304_dorsale_alexandrie_attachments_add_name.rb
dorsale-2.6.3 db/migrate/20151126132304_dorsale_alexandrie_attachments_add_name.rb
dorsale-2.6.2 db/migrate/20151126132304_dorsale_alexandrie_attachments_add_name.rb
dorsale-2.6.1 db/migrate/20151126132304_dorsale_alexandrie_attachments_add_name.rb
dorsale-2.6.0 db/migrate/20151126132304_dorsale_alexandrie_attachments_add_name.rb
dorsale-2.5.0 db/migrate/20151126132304_dorsale_alexandrie_attachments_add_name.rb
dorsale-2.4.3 db/migrate/20151126132304_dorsale_alexandrie_attachments_add_name.rb
dorsale-2.4.2 db/migrate/20151126132304_dorsale_alexandrie_attachments_add_name.rb