Sha256: 4f9f058e70740eacb622bc2facb8b7bda9e41c8ce20f5d55389c586a7927ae2c

Contents?: true

Size: 1.03 KB

Versions: 4

Compression:

Stored size: 1.03 KB

Contents

class CreateProducts < ActiveRecord::Migration
  def self.up
	  create_table "products",  :force => true do |t|
      t.column "name",        :string,  :limit => 100,                               :default => "",  :null => false
      t.column "description", :text                                                 
      t.column "price",       :decimal, :precision => 8, :scale => 2,                 :null => false
      t.column "category_id", :integer
      t.column "width",       :float,                                                :default => 0.0, :null => false
      t.column "height",      :float,                                                :default => 0.0, :null => false
      t.column "depth",       :float,                                                :default => 0.0, :null => false
      t.column "weight",      :float,                                                :default => 0.0, :null => false
      t.integer :viewable_id
      t.timestamps
    end
  end

  def self.down
    drop_table "products"
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spree-0.0.5 starter-app/vendor/plugins/spree/db/migrate/009_create_products.rb
spree-0.0.6 starter-app/vendor/plugins/spree/db/migrate/009_create_products.rb
spree-0.0.8 starter-app/vendor/plugins/spree/db/migrate/009_create_products.rb
spree-0.0.7 starter-app/vendor/plugins/spree/db/migrate/009_create_products.rb