Hacker News new | ask | show | jobs
by some1else 4076 days ago
Therefore the only thing left to do is run the following migration:

  add_index :discounts, [:promo_code_id, :customer_id, :order_id], :unique => true