Add foreign keys to the database