Added constrainsts in db