Sha256: 54d6fad4a016d5ea47e2772f6a75dede23b2fafaa442f8ed14770dc311cf49f2

Contents?: true

Size: 565 Bytes

Versions: 10

Compression:

Stored size: 565 Bytes

Contents

class AddDefaultProdAvailTypes
  
  def self.up
    ProdAvailabilityStatusType.create(
      :description => 'Available',
      :internal_identifier => 'available'
    )

    ProdAvailabilityStatusType.create(
      :description => 'Sold',
      :internal_identifier => 'sold'
    )

    ProdAvailabilityStatusType.create(
      :description => 'Shipped',
      :internal_identifier => 'shipped'
    )
  end
  
  def self.down
    %w(available sold shipped).each do |iid|
      ProdAvailabilityStatusType.find_by_internal_identifier(iid).destroy
    end
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
erp_products-4.2.0 db/data_migrations/20110527160807_add_default_prod_avail_types.rb
erp_products-4.0.0 db/data_migrations/20110527160807_add_default_prod_avail_types.rb
erp_products-3.1.1 db/data_migrations/20110527160807_add_default_prod_avail_types.rb
erp_products-3.1.0 db/data_migrations/20110527160807_add_default_prod_avail_types.rb
erp_products-3.0.5 db/data_migrations/20110527160807_add_default_prod_avail_types.rb
erp_products-3.0.4 db/data_migrations/20110527160807_add_default_prod_avail_types.rb
erp_products-3.0.3 db/data_migrations/20110527160807_add_default_prod_avail_types.rb
erp_products-3.0.2 db/data_migrations/20110527160807_add_default_prod_avail_types.rb
erp_products-3.0.1 db/data_migrations/20110527160807_add_default_prod_avail_types.rb
erp_products-3.0.0 db/data_migrations/20110527160807_add_default_prod_avail_types.rb