Giorgio Delgado
04/03/2020, 2:02 PMroberto.guerra
04/03/2020, 6:18 PMcore.NexusArgDef
seems to bring along the types defined for the other schema.roberto.guerra
04/03/2020, 6:30 PMRanjan Purbey
04/03/2020, 9:18 PMsequelize-cli
for managing my database migrations. After running a migrations, when I introspect the database, all the changes that were manually made into the schema.prisma
file are lost. I understand that before inspecting we can take a backup of the original schema, and in the freshly generated schema copy-paste the manual changes from the backup. But his setup doesn't seem ideal and is error-prone. Is there a better way to do this?El-Hussein Abdelraouf
04/03/2020, 9:30 PMPavlo Strunkin
04/03/2020, 10:02 PMversion: '3.3'
services:
postgres:
image: postgres
restart: always
environment:
POSTGRES_USER: prisma
POSTGRES_PASSWORD: prisma
POSTGRES_DB: prisma
ports:
- '5432:5432'
expose:
- '5432'
volumes:
- postgres:/var/lib/postgresql/data
migration:
build: .
depends_on:
- postgres
environment:
VK_DATABASE: <postgresql://prisma>:prisma@localhost:5432/prisma
POSTGRES_SERVER: postgres
POSTGRES_PORT: 5432
volumes:
postgres:
Dockerfile
FROM node:latest
RUN npm install -g @prisma/cli
ADD "<https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh>" /wait-for-it.sh
RUN chmod +xr /wait-for-it.sh
COPY schema.prisma /schema.prisma
COPY migrations/ /migrations/
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["up"]
entrypoint.sh
#!/bin/sh
exec /wait-for-it.sh $POSTGRES_SERVER:$POSTGRES_PORT -- npx prisma migrate up --experimental
the error
Error: Could not find query-engine binary. Searched in /usr/local/lib/node_modules/@prisma/cli/query-engine-debian-openssl-1.1.x and /usr/local/lib/node_modules/@prisma/query-engine-debian-openssl-1.1.x
workaround from here didn't help https://github.com/prisma/prisma/issues/1642
who knows what this might be?Jeremy
04/04/2020, 3:13 AMPavlo Strunkin
04/04/2020, 10:27 AMprisma migrate up --experimental --auto-approve
any other flags or workarounds you use for that cases?Slackbot
04/04/2020, 11:18 AMkhareta
04/04/2020, 1:23 PMGiorgio Delgado
04/04/2020, 4:22 PMprisma deploy
? Are there subtleties around prisma data models that would lead to non backwards-compatible changes in the database?
It's obvious that if you change the type of a field in prisma from say Int
to String
then you're going to get a breaking change. But i am asking about other more subtle situations that I may not be aware of.Giorgio Delgado
04/04/2020, 4:25 PMGiorgio Delgado
04/04/2020, 4:25 PMprisma deploy
then there is concern that i am introducing a breaking change on a live applicationTaylor
04/04/2020, 7:12 PMTaylor
04/04/2020, 7:12 PMTaylor
04/04/2020, 7:12 PMiandjx
04/05/2020, 3:35 AMTaylor
04/05/2020, 10:47 AMTaylor
04/05/2020, 10:48 AMPaul
04/05/2020, 1:31 PM...
"scripts": {
"start": "node dist/server",
"clean": "rm -rf dist",
"build": "npm -s run clean && npm -s run generate && tsc",
"generate": "npm -s run generate:prisma && npm -s run generate:nexus",
"generate:prisma": "prisma generate",
"generate:nexus": "ts-node --transpile-only src/schema",
"postinstall": "npm -s run generate",
"dev": "ts-node-dev --no-notify --respawn --transpileOnly src/server"
}
...
When I run "D:\Work\Grey Wolves\project-box-api> npm run generate"
I get this error:
> typescript-graphql@ generate D:\Work\Grey Wolves\gympack-box-api
> npm -s run generate:prisma && npm -s run generate:nexus
'D:\Work\Grey' is not recognized as an internal or external command,
operable program or batch file.
I guess the issue is in a spacebar in "Grey Wolves". Running on windows, and ideas on this?Giorgio Delgado
04/05/2020, 3:16 PMGiorgio Delgado
04/05/2020, 3:19 PMprisma deploy
i still hit connection limts even though I have 15 alloted connections with my psql dbGiorgio Delgado
04/05/2020, 3:20 PMconnectionLimit
to 7 in my prisma config tooTaylor
04/05/2020, 7:21 PMTaylor
04/05/2020, 7:21 PMTaylor
04/05/2020, 7:36 PMPeter Vive
04/05/2020, 8:26 PMMarcel
04/05/2020, 9:13 PMAdriano Resende
04/06/2020, 12:32 AMenum Role {
OWNER @unique
ADMIN
USER
}