Sha256: 85d47d820fa3f47aa026a3350277d69a91e18fdefe6165b5aae07b9e50f7f065
Contents?: true
Size: 911 Bytes
Versions: 12
Compression:
Stored size: 911 Bytes
Contents
class UpdateMobileApplication < ActiveRecord::Migration def up unless columns(:applications).collect { |c| c.name }.include?('xtype') rename_column :applications, :base_url, :xtype user_management = MobileApplication.find_by_internal_identifier('user_management') if user_management.nil? MobileApplication.create( :description => 'User Mgmt', :icon => 'icon-user', :internal_identifier => 'user_management', :xtype => 'compass-erpapp-mobile-usermanagement-application' ) else user_management.description = 'User Mgmt' user_management.xtype = 'compass-erpapp-mobile-usermanagement-application' user_management.save end end end def down if columns(:applications).collect { |c| c.name }.include?('xtype') rename_column :applications, :xtype, :base_url end end end
Version data entries
12 entries across 12 versions & 1 rubygems