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
I'm struggling to include kysely seed run within the scripts to start my server (using v0.9.0 of kysely-ctl). I've created some seed files using the following configuration:
// Omitting the implementation of the service for the sake of simplicity.import{CreateUserService}from"@src/components/users/services/createUser"importtype{Kysely}from"kysely"importmomentfrom"moment"import{DB}from"../generated/types/db"exportasyncfunctionseed(_: Kysely<DB>): Promise<void>{awaitnewCreateUserService({email: "[email protected]",password: "P@ssw0rd",birthDate: moment("2000-01-23").toDate(),name: "Foo Bar"}).call()}
Migrations and seeds' execution work fine, i.e. they modify/populate the database correctly, but the issue is more around the command kysely seed run which never stops its execution. This is messing up with the following script to start my server because it's running one instruction after the previous one finishes it's execution:
# For the sake of simplicity, I'm omitting `build` script.# Also, kysely:seed:run is the alias I use in my package.json for `kysely seed run`.
npm run build && npm run kysely:seed:run && node dist/src/index.js
This is a sample output of what I see after running the command, I have to manually stop the execution:
The text was updated successfully, but these errors were encountered:
SergioMD15
changed the title
seed run won't close the process after completing
Command seed run won't close the process after completing
Dec 9, 2024
What?
I'm struggling to include
kysely seed run
within the scripts to start my server (using v0.9.0 ofkysely-ctl
). I've created some seed files using the following configuration:Adding also a sample seed file in case it helps:
Migrations and seeds' execution work fine, i.e. they modify/populate the database correctly, but the issue is more around the command
kysely seed run
which never stops its execution. This is messing up with the following script to start my server because it's running one instruction after the previous one finishes it's execution:This is a sample output of what I see after running the command, I have to manually stop the execution:
The text was updated successfully, but these errors were encountered: