You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I was looking for an elegant solution to add seeding data in Drizzle via a CLI command. There doesn't seem to be an answer from the documentation, so I went ahead and gave it a try. This is what I came up with so far
Describe the solution you'd like to see
additional script for data seeding purpose in the package.json
Is your feature request related to a problem? Please describe.
I was looking for an elegant solution to add seeding data in Drizzle via a CLI command. There doesn't seem to be an answer from the documentation, so I went ahead and gave it a try. This is what I came up with so far
Describe the solution you'd like to see
additional script for data seeding purpose in the package.json
"script": { "build": "next build", "db:push": "dotenv drizzle-kit push:MySQL", "db:studio": "dotenv drizzle-kit studio", + "db:seed": "dotenv npx tsx ./src/server/db/seed.ts", "dev": "next dev", "lint": "next lint", "start": "next start", }
with a default seed.ts file, defined in
./src/server/db/seed.ts
Describe alternate solutions
N/A
Additional information
No response
The text was updated successfully, but these errors were encountered: