sql script for foreign keys