Sha256: 8330ab0110aaa9e69d2429715429691d62255c71c7c43db67e2e493d8e235f39

Contents?: true

Size: 567 Bytes

Versions: 6

Compression:

Stored size: 567 Bytes

Contents

class UpgradeCompassAeInstancesData < ActiveRecord::Migration
  def self.up
    if CompassAeInstance.find_by_internal_identifier('base').nil?
      c = CompassAeInstance.order('id ASC').first
      c.description = 'Base CompassAE Instance'
      c.internal_identifier = 'base'
      c.schema = 'public'
      c.save
    end

    if RoleType.find_by_internal_identifier('compass_ae_instance_owner').nil?
      rt = RoleType.new
      rt.description = 'CompassAE Instance Owner'
      rt.internal_identifier = 'compass_ae_instance_owner'
      rt.save
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
erp_base_erp_svcs-4.0.0 db/data_migrations/20130211555555_upgrade_compass_ae_instances_data.rb
erp_base_erp_svcs-3.1.5 db/data_migrations/20130211555555_upgrade_compass_ae_instances_data.rb
erp_base_erp_svcs-3.1.4 db/data_migrations/20130211555555_upgrade_compass_ae_instances_data.rb
erp_base_erp_svcs-3.1.3 db/data_migrations/20130211555555_upgrade_compass_ae_instances_data.rb
erp_base_erp_svcs-3.1.2 db/data_migrations/20130211555555_upgrade_compass_ae_instances_data.rb
erp_base_erp_svcs-3.1.1 db/data_migrations/20130211555555_upgrade_compass_ae_instances_data.rb