Ensure that foreign keys get correct table name with PrefixAdapter, fixes #425