mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-19 08:52:25 +01:00
9 lines
216 B
Ruby
9 lines
216 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
# Coupon's codes should validate uniqness in database
|
||
|
class AddUniqueIndexOnCouponCode < ActiveRecord::Migration[5.2]
|
||
|
def change
|
||
|
add_index :coupons, :code, unique: true
|
||
|
end
|
||
|
end
|