morning guys happy firday, got a Prisma deployment...
# orm-help
r
morning guys happy firday, got a Prisma deployment question. I am running Prisma 1.27 both locally and server. When I run
prisma deploy
i see messages such as the following
Copy code
Survey (Type)
  + Created type `Survey`
  + Created field `id` of type `ID!`
  + Created field `createdAt` of type `DateTime!`
  + Created field `updatedAt` of type `DateTime!`
  + Created field `date` of type `DateTime`
  + Created field `name` of type `String!`
  + Created field `Questions` of type `[Question!]!`

Question (Type)
  + Created type `Question`
  + Created field `id` of type `ID!`
  + Created field `updatedAt` of type `DateTime!`
  + Created field `createdAt` of type `DateTime!`
  + Created field `displayText` of type `String!`
  + Created field `surveys` of type `[Survey!]!`
 
QuestionOnSurvey (Relation)
  + Link Table `_QuestionOnSurvey` between `Question` and `Survey` has been created
There is also a counter saying
Applying changes (x/y)
. However I see that the counts decreases to 0 instead of increases. checking in the db itself shows only this table
_RelayId
is created. Any idea what could be wrong? Many thanks
To add more info, debug shows this
Copy code
Applying changes... (0/332)  client Sending query to cluster default +48ms
  client https://<myprismaendpoint>/management +0ms
  client query ($name: String! $stage: String!) {
  client           migrationStatus(name: $name stage: $stage) {
  client             projectId
  client             revision
  client             status
  client             applied
  client             rolledBack
  client             errors
  client           }
  client         }
  client        +0ms
  client { stage: 'default', name: 'dev' } +0ms
  client { migrationStatus:
  client    { rolledBack: 0,
  client      applied: 2,
  client      projectId: 'dev$default',
  client      errors: [],
  client      revision: 12,
  client      status: 'IN_PROGRESS' } } +160ms

Applying changes... (2/332)  client Sending query to cluster default +503ms
  client https://<myprismaendpoint>/management +0ms
  client query ($name: String! $stage: String!) {
  client           migrationStatus(name: $name stage: $stage) {
  client             projectId
  client             revision
  client             status
  client             applied
  client             rolledBack
  client             errors
  client           }
  client         }
  client        +0ms
  client { stage: 'default', name: 'dev' } +0ms
  client { migrationStatus:
  client    { rolledBack: 0,
  client      applied: 0,
  client      projectId: 'dev$default',
  client      errors: [],
  client      revision: 1,
  client      status: 'SUCCESS' } } +121ms

Applying changes... (0/332)
Applying changes... 1.3s
and prisma.yaml
Copy code
datamodel:
  - datamodel.graphql
  - enums.graphql

endpoint: https://<myprismaendpoint>/dev/

secret: ${env:PRISMA_AUTH_SECRET}
h
Can you please share your docker logs(use docker-compose logs) commands
r
I don't think I have a docker log as I didn't set it up via docker compose. I use a postgres cloudsql database and a kubernetes cluster as the server. Having said that thank you for pointing this out. I checked my server log and see this error
Encountered exception while applying migration. Rolling back. org.postgresql.util.PSQLException: ERROR: schema "<my_database>" does not exist
. So somehow prisma is confusing my actual database <my_databse> with a schema?
Thank you @Harshit, I managed to rollback server version to 1.22 (the one that i was using previously) and it seems to be working now. Many thanks.
h
@Ricky We are currently getting some reports that 1.27 has some new issues. I will keep you posted when these issues wil get fixed.
👍 1