Baris
07/21/2021, 12:56 PMnpx prisma migrate dev
returns this from the postgres container log:
2021-07-21 12:52:58.927 UTC [76] ERROR: relation "_prisma_migrations" does not exist at character 126
I have also defined the binaryTargets in the schema:
generator client {
provider = "prisma-client-js"
binaryTargets = ["native","linux-arm-openssl-1.1.x"]
}
Currently running node:16
on the docker container
When I am running a migration outside the docker container with
docker-compose run --publish 5555:5555 next npx prisma "migrate" "dev"
it throws an error that it could not reach the database:
Error: P1001: Can't reach database server at `test-postgres`:`5432`
The docker-compose for the db looks like this:
postgres:
container_name: 'test-postgres'
restart: unless-stopped
image: 'postgres:13'
platform: linux/arm64
ports:
- '15432:5432'
volumes:
- 'pgdata:/var/lib/postgresql/data/'
environment:
POSTGRES_PASSWORD: postgres
Baris
07/22/2021, 12:02 PM