class CreatePromotions < ActiveRecord::Migration
  def change
    create_table :promotions do |t|
      t.date :start_date, null: false
      t.date :end_date, null: false
      t.decimal :percent, default: 0
      t.belongs_to :product, index: true
      t.belongs_to :category, index: true
      t.belongs_to :user, index: true
      t.integer :status, null: false, default: 1
      t.timestamps null: false
    end
  end
end
