Prisma1: Deploying relation name change and explicit back relation is stuck

Created on 10 Aug 2018  ·  5Comments  ·  Source: prisma/prisma1

Describe the bug

When adding an implicit backrelational field and changing the relation name at the same time, the deployment will be stuck.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy this datamodel:
type Category {
    id: ID! @unique
    slug: String! @unique
}

type Project {
    id: ID! @unique
    slug: String! @unique
    category: Category! @relation(name: "Category")
}
  1. Deploy this datamodel:
type Category {
    id: ID! @unique
    slug: String! @unique
+   projects: [Project!]! @relation(name: "Category2")

}

type Project {
    id: ID! @unique
    slug: String! @unique
-   category: Category! @relation(name: "Category")
+   category: Category! @relation(name: "Category2")
}
  1. The deployment is stuck:
Deploying service `r-2796` to stage `dev2` to server `local` 104ms

Changes:

  Category (Type)
  + Created field `projects` of type `[Relation!]!`

  Project (Type)
  ~ Updated field `category`

  Category (Relation)
  - Deleted relation between undefined and undefined

  Category2 (Relation)
  + Created relation between Category and Project

Applying changes (19/5) ⣟

Expected behavior

The deployment goes through. The relation was renamed.

Versions (please complete the following information):

  • Prisma Server: prismagraphql/prisma:1.13

Additional context

Originally reported here: #2796. Added to #2018.

bu2-confirmed aredeploy areengine

All 5 comments

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Thanks for reporting the issue and your thorough description! 🙏 This has been fixed in 1.18.1.

For some reason, it’s still not working for me with 1.18.1. Still spinning at Applying changes.

image

Is 1.18.1 your server version, or your CLI version?
The relevant one in this context is the server version 🙂

Awesome, @marktani! That did it 🙌🏼

Was this page helpful?
0 / 5 - 0 ratings

Related issues

schickling picture schickling  ·  3Comments

Fi1osof picture Fi1osof  ·  3Comments

thomaswright picture thomaswright  ·  3Comments

jannone picture jannone  ·  3Comments

schickling picture schickling  ·  3Comments