change

in db/migrate/20171227114202_create_products.rb [1:16]


  def change
    create_table :products do |t|
      t.string :sku, null: false
      t.string :name, null: false
      t.text :description, null: false
      t.belongs_to :product_kind, foreign_key: true, null: false
      t.bigint :stock, null: false
      t.bigint :cost, null: false
      t.bigint :selling_price, null: false

      t.timestamps
    end

    add_index :products, :sku, {unique: true}
  end