Data factories
Is there a good way to add a data factory to Drizzle, so that I can add new users quickly for testing etc. (Ideally with being able to pass through relationship data as well).
1 Reply
There is no seeding helper from drizzle.
You have to create your own script to seed your database however you please
I have a seed.ts file in my drizzle/ folder and it looks like this:
I have this entry in my package.json:
"seed": "pnpm with-env ts-node --esm drizzle/run-seed.ts"
And then I just run it with pnpm seed