From 06a386b3e0914063f4020dda57ea5f294d249906 Mon Sep 17 00:00:00 2001 From: Michael Hartl Date: Thu, 26 Aug 2010 11:45:36 -0700 Subject: [PATCH] Added back migration --- db/migrate/20100822012431_add_email_uniqueness_index.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/migrate/20100822012431_add_email_uniqueness_index.rb diff --git a/db/migrate/20100822012431_add_email_uniqueness_index.rb b/db/migrate/20100822012431_add_email_uniqueness_index.rb new file mode 100644 index 0000000..95c5122 --- /dev/null +++ b/db/migrate/20100822012431_add_email_uniqueness_index.rb @@ -0,0 +1,9 @@ +class AddEmailUniquenessIndex < ActiveRecord::Migration + def self.up + add_index :users, :email, :unique => true + end + + def self.down + remove_index :users, :email + end +end