adds constraints onto the database
updates user factory to respect constraints