sutty/db/migrate/20190711183726_add_unique_to_site_name.rb

10 lines
224 B
Ruby
Raw Permalink Normal View History

2019-07-11 19:00:28 +00:00
# frozen_string_literal: true
# Los nombres de los sitios son únicos
class AddUniqueToSiteName < ActiveRecord::Migration[5.2]
def change
remove_index :sites, :name
add_index :sites, :name, unique: true
end
end