Sha256: 87ad7d2187d312e37c30dd2285cf588f355d28b706aaeaa1469629f4ef5185dd

Contents?: true

Size: 599 Bytes

Versions: 9

Compression:

Stored size: 599 Bytes

Contents

class DropMarketingEngineeringProducts < ActiveRecord::Migration
  class Katello::MarketingProduct < ActiveRecord::Base
    self.table_name = "katello_products"
  end

  def up
    drop_table :katello_marketing_engineering_products
    Katello::Product.where(:type => "Katello::MarketingProduct").delete_all

    remove_column :katello_products, :type
  end

  def down
    create_table "katello_marketing_engineering_products", :force => true do |t|
      t.integer "marketing_product_id"
      t.integer "engineering_product_id"
    end

    add_column :katello_products, :type, :string
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
katello-2.4.5 db/migrate/20150908222711_drop_marketing_engineering_products.rb
katello-2.4.4 db/migrate/20150908222711_drop_marketing_engineering_products.rb
katello-2.4.3 db/migrate/20150908222711_drop_marketing_engineering_products.rb
katello-2.4.2 db/migrate/20150908222711_drop_marketing_engineering_products.rb
katello-2.4.1 db/migrate/20150908222711_drop_marketing_engineering_products.rb
katello-2.4.0 db/migrate/20150908222711_drop_marketing_engineering_products.rb
katello-2.4.0.rc3 db/migrate/20150908222711_drop_marketing_engineering_products.rb
katello-2.4.0.rc2 db/migrate/20150908222711_drop_marketing_engineering_products.rb
katello-2.4.0.rc1 db/migrate/20150908222711_drop_marketing_engineering_products.rb