Changed test route on exception. Add scripts for adding foreign key and index.