prisma1 icon indicating copy to clipboard operation
prisma1 copied to clipboard

Error: `Prisma deploy` on docker-compose with param `schema: public`. Existing db.

Open SawasReaper opened this issue 5 years ago • 2 comments

Hi, bug i've found is related with schema: public. When I added it to my docker-compose.yml and went with prisma deploy it crashes on my real pgsql database and nth wasn't added to project/migration tables in managment schema.

Screenshot 2019-03-31 at 00 23 32

Why I need schema: pubic is in here https://github.com/prisma/prisma/issues/4278

But when I comment schema: public and run prisma deploy it's 👌 and my model is added to migration table in managment schema.

Screenshot 2019-03-31 at 00 36 10 Screenshot 2019-03-31 at 00 26 30

Then I uncommented my schema: public and restarted docker container and it's fine.

Screenshot 2019-03-31 at 00 29 44

Full log from debug:

Screenshot 2019-03-31 at 00 31 12

docker-compose.yml

version: "3.6"

services:
  offhub_pgsql:
    image: postgres:9.6.6-alpine
    volumes:
      - ./postgres_data:/var/lib/postgresql/data/
    environment: 
      POSTGRES_USER: offhub
      POSTGRES_PASSWORD: offhub
      POSTGRES_DB: offhub
    ports:
      - 5432:5432

  prisma:
    image: prismagraphql/prisma:1.29.2
    restart: always
    ports:
    - "4466:4466"
    environment:
      PRISMA_CONFIG: |
        port: 4466
        # uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
        managementApiSecret: my-secret
        databases:
          default:
            connector: postgres
            host: host.docker.internal 
            database: offhub
            user: offhub
            password: offhub
            rawAccess: true
            port: '5432'
            migrations: false
            schema: public

volumes:
  postgres:

Versions (please complete the following information):

Connector: Postgres Prisma Server: 1.29.2 prisma CLI: prisma/1.29.1 (darwin-x64) node-v10.15.1 OS: OS X High Sierra other dependencies: prisma-client

If you need some more info please tell me. I'm happy to help.

SawasReaper avatar Apr 01 '19 16:04 SawasReaper

Are you using any fields with the data_type timestamptz ? image

ongerit avatar Apr 05 '19 21:04 ongerit

For me deploy is failing because Prisma doesn’t support Postgres timestamptz columns.

ongerit avatar Apr 08 '19 14:04 ongerit