mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
6ae8c965f3
Also: code lint in SSO models
13 lines
582 B
Ruby
13 lines
582 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Add uniqueness constraint at database level
|
|
class AddUniquenessConstraints < ActiveRecord::Migration[5.2]
|
|
def change
|
|
add_index :credits, %i[plan_id creditable_id creditable_type], unique: true
|
|
add_index :prices, %i[plan_id priceable_id priceable_type group_id duration], unique: true,
|
|
name: 'index_prices_on_plan_priceable_group_and_duration'
|
|
add_index :price_categories, :name, unique: true
|
|
add_index :auth_providers, :name, unique: true
|
|
end
|
|
end
|