Sha256: d8d896e9cf94fcf64f2ce73d7e5f3abb2c8b0800a8c015bee6e098710965956c

Contents?: true

Size: 1.09 KB

Versions: 4

Compression:

Stored size: 1.09 KB

Contents

class Products < ActiveRecord::Migration
  def change
    create_table :products do |t|
      t.float       :price      , :null => false
      t.string      :name       , :null => false
      t.string      :link        
      t.text        :description , :default => ""
      t.text        :summary      , :default => ""
      t.attachment  :main_picture
      t.attachment  :extra_picture
      t.boolean     :online ,       :default => false
      t.float       :cost ,         :default => 0.0
      t.float       :weight ,       :default => 0.1
      t.string      :ean,           :default => ""
      t.float       :tax,           :default => 0.0
      t.integer     :inventory ,    :default => 0
      t.integer     :stock_level ,  :default => 0
      t.string      :properties,    :default => ""
      t.string      :scode,         :default => ""
      t.date        :deleted_on
      t.references  :product,        index: true
      t.references  :category,       index: true
      t.references  :supplier,       index: true
      t.timestamps :null => false
    end
    add_index :products, :link
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
post_clerk-0.6 test_app/db/migrate/20141114205532_products.office.rb
accountant_clerk-0.8 test_app/db/migrate/20141114205532_products.office.rb
post_clerk-0.5 test_app/db/migrate/20141114205532_products.office.rb
accountant_clerk-0.7 test_app/db/migrate/20141114205532_products.office.rb