Add indexes and FK constraint