Add indexes and constraints