Story#108091488 - add index to reserved domains

This commit is contained in:
Vladimir Krylov 2016-01-05 15:03:29 +02:00
parent 6415bfae38
commit 6be09329d7
3 changed files with 167 additions and 110 deletions

View file

@ -2,6 +2,7 @@ class NameAndPasswordForReservedDomain < ActiveRecord::Migration
def up
add_column :reserved_domains, :name, :string
add_column :reserved_domains, :password, :string
add_index :reserved_domains, :name
ReservedDomain.find_each do |domain|
names = domain.names