added constraints to schema