support foreign key generation


Signed-off-by: NICK <gostart84@gmail.com>