Added foreign keys to database