1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/db/migrate/20221229105954_add_unique_index_on_coupon_code.rb
2023-02-15 10:29:46 +01:00

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