Sha256: a5d0c8c72790ef650419794fbe2fa7ee2d0b844f330549a8f29e084b28518e9b

Contents?: true

Size: 478 Bytes

Versions: 12

Compression:

Stored size: 478 Bytes

Contents

# This migration comes from knitkit (originally 20121129185611)
class UpgradeWebsiteRoleIid
  
  def self.up
    #insert data here
    Website.all.each do |w|
      old_role_iid = "website_#{w.name.underscore.gsub("'","").gsub(",","")}_access"

      r = SecurityRole.find_by_internal_identifier(old_role_iid)
      unless r.nil?
        r.internal_identifier = w.website_role_iid
        r.save
      end      
    end
  end
  
  def self.down
    #remove data here
  end

end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
knitkit-2.1.14 spec/dummy/db/data_migrations/20121129185611_upgrade_website_role_iid.knitkit.rb
knitkit-2.1.13 spec/dummy/db/data_migrations/20121129185611_upgrade_website_role_iid.knitkit.rb
knitkit-2.1.12 spec/dummy/db/data_migrations/20121129185611_upgrade_website_role_iid.knitkit.rb
knitkit-2.1.9 spec/dummy/db/data_migrations/20121129185611_upgrade_website_role_iid.knitkit.rb
knitkit-2.1.8 spec/dummy/db/data_migrations/20121129185611_upgrade_website_role_iid.knitkit.rb
knitkit-2.1.7 spec/dummy/db/data_migrations/20121129185611_upgrade_website_role_iid.knitkit.rb
knitkit-2.1.5 spec/dummy/db/data_migrations/20121129185611_upgrade_website_role_iid.knitkit.rb
erp_search-3.1.1 spec/dummy/db/data_migrations/20121129185611_upgrade_website_role_iid.knitkit.rb
knitkit-2.1.1 spec/dummy/db/data_migrations/20121129185611_upgrade_website_role_iid.knitkit.rb
knitkit-2.1.0 spec/dummy/db/data_migrations/20121129185611_upgrade_website_role_iid.knitkit.rb
erp_search-3.1.0 spec/dummy/db/data_migrations/20121129185611_upgrade_website_role_iid.knitkit.rb
erp_invoicing-3.1.0 spec/dummy/db/data_migrations/20121129185611_upgrade_website_role_iid.knitkit.rb