Sha256: 6bcbc3efcd89fdb971d6885610dd9ba3342b89d7865f9216ee93de2115f0d877

Contents?: true

Size: 536 Bytes

Versions: 20

Compression:

Stored size: 536 Bytes

Contents

# This migration comes from erp_base_erp_svcs (originally 20130404171435)
require 'uuid'

class AddUuidCompassAeInstance < ActiveRecord::Migration
  def self.up
    unless columns(:compass_ae_instances).collect {|c| c.name}.include?('guid')
      add_column :compass_ae_instances, :guid, :string
      add_index :compass_ae_instances, :guid, :name => "guid_idx"
    end
  end

  def self.down
    if columns(:compass_ae_instances).collect {|c| c.name}.include?('guid')
      remove_column :compass_ae_instances, :guid
    end
  end
end

Version data entries

20 entries across 20 versions & 6 rubygems

Version Path
erp_tech_svcs-3.1.8 spec/dummy/db/migrate/20130422151250_add_uuid_compass_ae_instance.erp_base_erp_svcs.rb
knitkit-2.1.14 spec/dummy/db/migrate/20130422154403_add_uuid_compass_ae_instance.erp_base_erp_svcs.rb
knitkit-2.1.13 spec/dummy/db/migrate/20130422154403_add_uuid_compass_ae_instance.erp_base_erp_svcs.rb
erp_app-3.1.14 spec/dummy/db/migrate/20130422163124_add_uuid_compass_ae_instance.erp_base_erp_svcs.rb
knitkit-2.1.12 spec/dummy/db/migrate/20130422154403_add_uuid_compass_ae_instance.erp_base_erp_svcs.rb
erp_tech_svcs-3.1.5 spec/dummy/db/migrate/20130422151250_add_uuid_compass_ae_instance.erp_base_erp_svcs.rb
erp_app-3.1.12 spec/dummy/db/migrate/20130422163124_add_uuid_compass_ae_instance.erp_base_erp_svcs.rb
erp_base_erp_svcs-3.1.5 spec/dummy/db/migrate/20130422154231_add_uuid_compass_ae_instance.erp_base_erp_svcs.rb
knitkit-2.1.9 spec/dummy/db/migrate/20130422154403_add_uuid_compass_ae_instance.erp_base_erp_svcs.rb
knitkit-2.1.8 spec/dummy/db/migrate/20130422154403_add_uuid_compass_ae_instance.erp_base_erp_svcs.rb
erp_tech_svcs-3.1.4 spec/dummy/db/migrate/20130422151250_add_uuid_compass_ae_instance.erp_base_erp_svcs.rb
erp_base_erp_svcs-3.1.4 spec/dummy/db/migrate/20130422154231_add_uuid_compass_ae_instance.erp_base_erp_svcs.rb
erp_app-3.1.10 spec/dummy/db/migrate/20130422163124_add_uuid_compass_ae_instance.erp_base_erp_svcs.rb
erp_app-3.1.8 spec/dummy/db/migrate/20130422163124_add_uuid_compass_ae_instance.erp_base_erp_svcs.rb
erp_txns_and_accts-3.1.1 spec/dummy/db/migrate/20130422155326_add_uuid_compass_ae_instance.erp_base_erp_svcs.rb
erp_commerce-3.1.3 spec/dummy/db/migrate/20130422155143_add_uuid_compass_ae_instance.erp_base_erp_svcs.rb
knitkit-2.1.5 spec/dummy/db/migrate/20130422154403_add_uuid_compass_ae_instance.erp_base_erp_svcs.rb
erp_app-3.1.6 spec/dummy/db/migrate/20130422153807_add_uuid_compass_ae_instance.erp_base_erp_svcs.rb
erp_tech_svcs-3.1.3 spec/dummy/db/migrate/20130422151250_add_uuid_compass_ae_instance.erp_base_erp_svcs.rb
erp_base_erp_svcs-3.1.3 spec/dummy/db/migrate/20130422154231_add_uuid_compass_ae_instance.erp_base_erp_svcs.rb