Add missing users.email unique index at database level
This commit is contained in:
parent
20e8bdbf4f
commit
ffa811db46
@ -0,0 +1,9 @@
|
|||||||
|
class AddEmailUniqueIndexToUsers < ActiveRecord::Migration
|
||||||
|
def self.up
|
||||||
|
add_index :users, :email, :unique => true
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.down
|
||||||
|
drop_index :users, :email
|
||||||
|
end
|
||||||
|
end
|
@ -10,7 +10,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20110830110346) do
|
ActiveRecord::Schema.define(:version => 20110913195421) do
|
||||||
|
|
||||||
create_table "playlists", :force => true do |t|
|
create_table "playlists", :force => true do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
@ -44,4 +44,6 @@ ActiveRecord::Schema.define(:version => 20110830110346) do
|
|||||||
t.string "password_hash"
|
t.string "password_hash"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
add_index "users", ["email"], :name => "index_users_on_email", :unique => true
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user