added some schema constraints