Hey everyone, I am currently facing some issues wi...
# orm-help
b
Hey everyone, I am currently facing some issues with prisma and postgres inside a docker container on the new M1 - Apple Silicion architecutre and wanted to ask if someone had experienced that before and solved it. Running a migration
npx 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:
Copy code
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:
Copy code
Error: P1001: Can't reach database server at `test-postgres`:`5432`
The docker-compose for the db looks like this:
Copy code
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
I have created a repo to reproduce this error on a M1 machine: https://github.com/baristikir/prisma-postgres-M1