Sha256: eb6c41a369f81b3af03d4f67a94211c80239da5245c4f35c36273b372d38c507

Contents?: true

Size: 1.07 KB

Versions: 41

Compression:

Stored size: 1.07 KB

Contents

# This migration comes from erp_app (originally 20110817160743)
class AddFileManagerApplication
  
  def self.up
    if DesktopApplication.find_by_internal_identifier('file_manager').nil?
      file_manager_app = DesktopApplication.create(
        :description => 'File Manager',
        :icon => 'icon-folders',
        :javascript_class_name => 'Compass.ErpApp.Desktop.Applications.FileManager',
        :internal_identifier => 'file_manager',
        :shortcut_id => 'file_manager-win'
      )

      file_manager_app.preference_types << PreferenceType.iid('desktop_shortcut')
      file_manager_app.preference_types << PreferenceType.iid('autoload_application')
      file_manager_app.save
    
      admin_user = User.find_by_username('admin')
      admin_user.desktop.applications << file_manager_app
      admin_user.save
    
      truenorth_user = User.find_by_username('truenorth')
      truenorth_user.desktop.applications << file_manager_app
      truenorth_user.save
    end
  end
  
  def self.down
    DesktopApplication.find_by_internal_identifier('file_manager').destroy
  end

end

Version data entries

41 entries across 41 versions & 14 rubygems

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