discourse/db/migrate/20200414034210_add_canonica...

8 lines
270 B
Ruby

# frozen_string_literal: true
class AddCanonicalEmailToUserEmail < ActiveRecord::Migration[6.0]
def change
add_column :user_emails, :canonical_email, :string, length: 513
add_index :user_emails, :canonical_email, where: 'canonical_email IS NOT NULL'
end
end