if you look at the migration SQL, you'll see it sets both "A" and "B" as foreign keys back to the other tables, and relies on a cascade delete. Having a PK on the table isn't needed as you don't need to ever reference that record directly based an arbitrary identifier, but you rely on accessing Table B's data based on the link from Table A's ID, or vice versa.