Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Deploying relation name change and explicit back relation is stuck #2906

Closed
marktani opened this issue Aug 10, 2018 · 5 comments
Closed

Deploying relation name change and explicit back relation is stuck #2906

marktani opened this issue Aug 10, 2018 · 5 comments

Comments

@marktani
Copy link
Contributor

marktani commented Aug 10, 2018

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.

@stale
Copy link

stale bot commented Sep 24, 2018

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.

@stale stale bot added the status/stale Marked as state by the GitHub stalebot label Sep 24, 2018
@marktani marktani removed the status/stale Marked as state by the GitHub stalebot label Sep 25, 2018
@mavilein
Copy link
Contributor

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

@heymartinadams
Copy link

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

image

@marktani
Copy link
Contributor Author

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

@heymartinadams
Copy link

Awesome, @marktani! That did it 🙌🏼

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants