added code to create required fk indexes