kaspth / oaken

A fresh blended alternative to Fixtures & FactoryBot for dev and test data.
MIT License
201 stars 6 forks source link

Group seeds by top level model + plus data tables #28

Closed kaspth closed 1 year ago

kaspth commented 1 year ago

We're moving further away from Fixtures 1-1 where a file maps to one table. We started this by allowing updates to multiple models in one file, but now we're adding an additional conceptual layer to help reveal apps' systems.

We'll be recommending that apps have files for their top-level model: their account concept. Which could be Account, Team, Organization, etc.

This way, we still get the slice of the world that fixtures are good at, but way easier to understand how things connect because they're all hanging off that top-level model.

I'm also recommending a test/seeds/data folder for any clear data-tables that apps need, which also contain production data.