This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def generate_uuid(prefix, id) | |
UUIDTools::UUID.sha1_create(UUIDTools::UUID_OID_NAMESPACE, "#{prefix}-#{id}") | |
end | |
class TransformToUuids < ActiveRecord::Migration | |
def change | |
models = [Contact, User, Version] | |
models.each do |model| | |
# Create new column for uuid |