@snusnu I think I like it better when the database yields a block and the base relations are defined within that.

I think the relation() helper should only be available in the schema block, not the database block though.