update user schema for sparseness and uniqueness on email

This commit is contained in:
Michael Q Larson
2015-01-11 18:24:36 -08:00
parent b30a3e9d93
commit da3ed43b2f

View File

@ -7,7 +7,8 @@ var userSchema = new mongoose.Schema({
type: String, type: String,
lowercase: true, lowercase: true,
unique: true, unique: true,
trim: true trim: true,
sparse: true
}, },
password: String, password: String,
facebook: String, facebook: String,
@ -266,8 +267,8 @@ var userSchema = new mongoose.Schema({
profile: { profile: {
username: { username: {
type: String, type: String,
default: '',
unique: true, unique: true,
sparse: true,
lowercase: true, lowercase: true,
trim: true trim: true
}, },