Skip to content
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

Closed
wants to merge 3 commits into from
Closed

Add prisma seed for dev dump #66

wants to merge 3 commits into from

Conversation

rkperes
Copy link

@rkperes rkperes commented May 11, 2024

Add prisma seed for dev dump.
Update scripts to run it automatically in docker-compose.

docker-compose.dev.yml Outdated Show resolved Hide resolved
prisma/seed.ts Show resolved Hide resolved
@rkperes rkperes requested a review from mvares May 11, 2024 20:50
rkperes added 2 commits May 11, 2024 17:53
Add prisma seed for dev dump.
Update scripts to run it automatically in docker-compose.
prisma/seed.ts Outdated Show resolved Hide resolved
@rkperes rkperes requested a review from mvares May 13, 2024 01:45
Copy link

@mvares mvares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mvares
Copy link

mvares commented May 13, 2024

@filipepacheco, da uma olhada aqui

@thaua
Copy link

thaua commented May 13, 2024

Boa!

Copy link
Member

@giggio giggio left a 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",
Copy link
Member

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.

@giggio giggio self-assigned this May 20, 2024
@rkperes
Copy link
Author

rkperes commented Sep 25, 2024

Since is by now pretty old.
Let me know if you want me to come back to it.

@rkperes rkperes closed this Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants