add foreign key UI logic and related config