Sha256: 61b17d085513ecb67e52d052afab2946b99863b925ca565d1567bff9d63e843d

Contents?: true

Size: 833 Bytes

Versions: 9

Compression:

Stored size: 833 Bytes

Contents

class CreateProducts < ActiveRecord::Migration[5.1]
  def change
    create_table :dhatu_products do |t|
      
      t.string :title, :null => false, :limit=>256
      t.string :sub_title, :null => false, :limit=>256

      t.string :ean_sku, :limit=>256
      t.string :reference_number, :limit=>256
      
      t.references :manufacturer
      t.references :category
      t.references :top_category

      t.string :short_description, null: true, limit: 512
      t.text   :description
      
      t.decimal :price, :precision => 12, :scale => 6, default: 0.00
      
      t.string :status, :null => false, :default=>"unpublished", :limit=>16
      t.boolean :featured, default: false
      t.integer :priority, default: 1, null: false

      t.timestamps null: false
    end

    add_index :dhatu_products, :status
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
dhatu-0.3.9.pre.materialize db/migrate/20180101093439_create_products.rb
dhatu-0.3.8.pre.materialize db/migrate/20180101093439_create_products.rb
dhatu-0.3.7.pre.materialize db/migrate/20180101093439_create_products.rb
dhatu-0.3.6.pre.materialize db/migrate/20180101093439_create_products.rb
dhatu-0.3.5.pre.materialize db/migrate/20180101093439_create_products.rb
dhatu-0.3.4.pre.materialize db/migrate/20180101093439_create_products.rb
dhatu-0.3.3.pre.materialize db/migrate/20180101093439_create_products.rb
dhatu-0.3.2.pre.materialize db/migrate/20180101093439_create_products.rb
dhatu-0.3.1.pre.materialize db/migrate/20180101093439_create_products.rb