How are you all seeding your database?

I see a question from back in March (5 months ago -- helpAny guidance on how to seed? -- ) answered that it 's planned for in-code custom migrations. IMO seeding from within migrations isn't great, and is actually warned against in some other stacks (eg: Rails).

I've fiddled around a bit this morning, trying to get a basic "hello world" ts-node script to run and load my ''src/lib/db" to get connection and schema, but had no luck. It seems like this should be an easy thing, to simply have a stand-alone script that could load up the drizzle-orm connection and schema, and use them to insert some data.

Can I get a pointer in the right direction? Thanks!!
Was this page helpful?