-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add prisma seed for dev dump #66
Conversation
Add prisma seed for dev dump. Update scripts to run it automatically in docker-compose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@filipepacheco, da uma olhada aqui |
Boa! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Estou recebendo erros ao rodar, por exemplo:
Running seed command `ts-node prisma/seed.ts` ...
PrismaClientKnownRequestError:
Invalid `prisma.$executeRawUnsafe()` invocation:
Raw query failed. Code: `42601`. Message: `ERROR: unterminated quoted string at or near "e'4f95853f-d5e1-487d-8086-6ddfaf2bbab7"`
@@ -20,9 +20,12 @@ | |||
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", | |||
"test:e2e": "jest --config ./test/jest-e2e.json", | |||
"migrations:run": "npx prisma migrate deploy", | |||
"migrations:dev": "npx prisma migrate dev", | |||
"migrations:dev": "npx prisma migrate dev && npx prisma db seed", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Não é necessário rodar o prisma deb seed
, ele roda sozinho após o prisma migrate dev
.
O que seria legal é retirar o npx
dos dois comandos, que é desnecessário, já que os comandos do npm rodam sob o contexto do node_modules/bin
no path.
Since is by now pretty old. |
Add prisma seed for dev dump.
Update scripts to run it automatically in docker-compose.