Sha256: dc1b7c5fc0406ac9719ee4c849c164fa9c3b335505fa1bbe00d720ca632c6df4

Contents?: true

Size: 347 Bytes

Versions: 4

Compression:

Stored size: 347 Bytes

Contents

class CreateProductCategories < ActiveRecord::Migration
  def self.up
    create_table :product_categories do |t|
      t.string :category_name

      t.timestamps
    end
    add_column :products, :product_category_id, :integer
  end

  def self.down
    remove_column :products, :product_category_id
    drop_table :product_categories
  end
end

Version data entries

4 entries across 3 versions & 1 rubygems

Version Path
admin_assistant-2.1.0 rails_3_0/db/migrate/20090714024501_create_product_categories.rb
admin_assistant-2.0.1 rails_2_test/db/migrate/20090714024501_create_product_categories.rb
admin_assistant-2.0.1 rails_3_test/db/migrate/20090714024501_create_product_categories.rb
admin_assistant-1.0.1 test_rails_app/db/migrate/20090714024501_create_product_categories.rb