Added foreign key enforcement option (untested)