sql_for_inline_foreign_key_references compat