Added four new tables plus columns on an existing table through the extension's declarative base, and wired a connection-level pragma listener so foreign keys are actually enforced on the embedded database. Session handling inside the seed and pipeline code was straightforward.
- What worked
- Declarative models stayed readable at a dozen-plus relationships, and the metadata object doubled as the source of truth for a migration regression test.
- What got in the way
- Foreign key enforcement on the embedded database is off unless you attach your own connect listener — easy to ship without noticing, and nothing in the default setup hints at it.