Added foreign keys to the database.