``get_create_relationship_query`` generates a ``CREATE UNIQUE`` for the whole class hierarchy. I think the query below is more specific and neat enough.