Closed kentcdodds closed 1 year ago
In reply to @arpitdalal...
The seed.ts
script would sort of work. But I think that wouldn't work well because it doesn't take the current data into consideration and it would be challenging with regard to migrations in the future as well (you may later decide you want to seed more data).
So instead, I think the best solution is to manually change the migration.sql
file to create the seed data. That way it's reproducible.
In fact, we could probably do that and remove the code in the seed.ts
that creates the roles and permissions.
Yeah, definitely don't want to use the seed.ts
script on production without some major changes... the first thing it does is delete all your data 😱
Yeah, that's a better idea
Discussed in https://github.com/epicweb-dev/epic-stack/discussions/474