Sha256: d5eeed48bcda7fb85de2160ae48fd865340234999621b5e41355b4fab878656f

Contents?: true

Size: 1.24 KB

Versions: 40

Compression:

Stored size: 1.24 KB

Contents

# This migration comes from erp_app (originally 20111108183740)
class AddNewContactWidgets
  
  def self.up
    crm_app = OrganizerApplication.find_by_internal_identifier('crm')
     
    unless crm_app.nil?
      Widget.find_by_internal_identifier('party_contact_management').destroy

      phone_number_managementt_widget = ::Widget.create(     
        :description => 'Phone Number Management',
        :icon => 'icon-grid',     
        :xtype => 'phonenumbergrid',
        :internal_identifier => 'phone_number_management'
      )

      email_address_management_widget = ::Widget.create(
        :description => 'Email Address Management',
        :icon => 'icon-grid',
        :xtype => 'emailaddressgrid',
        :internal_identifier => 'email_address_management'
      )

      postal_address_management_widget = ::Widget.create(
        :description => 'Postal Address Management',
        :icon => 'icon-grid',
        :xtype => 'postaladdressgrid',
        :internal_identifier => 'postal_address_management'
      )

      crm_app.widgets << phone_number_managementt_widget
      crm_app.widgets << email_address_management_widget
      crm_app.widgets << postal_address_management_widget
      crm_app.save

    end
  end
  
  def self.down
  end

end

Version data entries

40 entries across 40 versions & 13 rubygems

Version Path
knitkit-2.1.14 spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb
knitkit-2.1.13 spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb
erp_forms-3.1.1 spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb
erp_app-3.1.14 spec/dummy/db/data_migrations/20130422163143_add_new_contact_widgets.erp_app.rb
knitkit-2.1.12 spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb
erp_orders-3.1.1 spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb
erp_app-3.1.12 spec/dummy/db/data_migrations/20130422163143_add_new_contact_widgets.erp_app.rb
knitkit-2.1.9 spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb
knitkit-2.1.8 spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb
erp_forms-3.1.0 spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb
erp_app-3.1.10 spec/dummy/db/data_migrations/20130422163143_add_new_contact_widgets.erp_app.rb
erp_app-3.1.9 spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb
erp_app-3.1.8 spec/dummy/db/data_migrations/20130422163143_add_new_contact_widgets.erp_app.rb
knitkit-2.1.7 spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb
erp_txns_and_accts-3.1.1 spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb
erp_commerce-3.1.3 spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb
knitkit-2.1.5 spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb
erp_app-3.1.6 spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb
erp_products-3.1.1 spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb
erp_commerce-3.1.1 spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb