Prisma deploy does not deploy and does not show any errors

prisma

#1

Prisma deploy does not deploy the datamodel. It shows that the deployment is successful. But the new datamodel does not appear in the prisma playground or in prisma admin.

If i try to deploy one more time, it shows the deployment of the same datamodel as if I have not deployed anything before. And it’s again not successful. Seems to be some kind of a vicious circle.

Everything worked fine till mid March. And since then I could not resolve it. Could you help me?

Deploying service savvvy to stage dev to server prisma-us1 3.7s

Changes:


LessonConstructions (Relation)

  • Link Table _LessonConstructions between Construction and Lesson has been created

Applying changes 2.0s

post-deploy:

Running graphql get-schema -p prisma :heavy_check_mark:

Generating schema… 71ms
Saving Prisma GraphQL schema (SDL) at /Users/mihailkockin/Desktop/Savvy/Savvy-dev/savvy-back/src/generated/prisma.graphql

Running prisma generate :heavy_check_mark:

Your Prisma GraphQL database endpoint is live:

HTTP: https://us1.prisma.sh/mikhail-kochkin/savvvy/dev
WS: wss://us1.prisma.sh/mikhail-kochkin/savvvy/dev

You can view & edit your data here:


#2

Hi @MikhailKochkin

Can you please try deploying this under a new service name? (Use prisma deploy -n)


#3

Hi @pantharshit00

Thanks for reaching out. Unfortunately such deployment does not seem to change anything.


#4

Can you please share your datamodel?


#5

Sure:

enum Permission {
ADMIN
USER
CASECREATE
CASEUPDATE
CASEDELETE
PERMISSIONUPDATE
}

enum CourseType {
PUBLIC
PRIVATE
}

type User {
id: ID! @unique
name: String!
email: String! @unique
password: String!
resetToken: String
resetTokenExpiry: Float
favourites: [ID]
subjects: [ID]
sandboxes: [ID]
permissions: [Permission]
coursePages: [CoursePage] @relation(name: “UserCoursePage” onDelete: CASCADE)
sandboxPages: [SandboxPage] @relation(name: “UserSandboxPage” onDelete: CASCADE)
sandboxPageGoals: [SandboxPageGoal] @relation(name: “UserSandboxPageGoals”)
lessons: [Lesson]!
tests: [Test]!
problems: [Problem]!
construction: [Construction]!
textEditor: [TextEditor]!
isFamiliar: Boolean! @default(value: “false”)
createdAt: DateTime!
}

type CoursePage {
id: ID! @unique
title: String!
description: String!
image: String!
user: User! @relation(name: “UserCoursePage”)
lessons: [Lesson]! @relation(name: “LessonsOnCoursePage” onDelete: CASCADE)
applications: [Application]! @relation(name: “ApplicationOnCoursePage” onDelete: CASCADE)
tags: [String]
courseType: CourseType
students: [ID]
createdAt: DateTime!
updatedAt: DateTime!
}

type SandboxPage {
id: ID! @unique
title: String!
description: String!
image: String!
user: User! @relation(name: “UserSandboxPage”)
sandboxes: [Sandbox]! @relation(name: “SandboxesOnSandboxPage” onDelete: CASCADE)
sandboxPageGoals: [SandboxPageGoal] @relation(name: “GoalsOnSandboxPage” onDelete: CASCADE)
students: [ID]
createdAt: DateTime!
updatedAt: DateTime!
}

type SandboxPageGoal {
id: ID! @unique
goal: String!
user: User! @relation(name: “UserSandboxPageGoals”)
completed: Boolean! @default(value: “false”)
sandboxPage: SandboxPage @relation(name: “GoalsOnSandboxPage”)
sandboxPageID: ID!
createdAt: DateTime!
updatedAt: DateTime!
}

type Lesson {
id: ID! @unique
name: String!
number: Int
text: String!
video: String
user: User!
coursePage: CoursePage! @relation(name: “LessonsOnCoursePage”)
tests: [Test] @relation(name: “LessonTests” onDelete: CASCADE)
problems: [Problem] @relation(name: “LessonProblems” onDelete: CASCADE)
constructions: [Construction] @relation(name: “LessonConstructions” onDelete: CASCADE)
texteditors: [TextEditor] @relation(name: “LessonTextEditors” onDelete: CASCADE)
coursePageID: ID!
createdAt: DateTime!
updatedAt: DateTime!
}

type Construction {
id: ID! @unique
name: String!
dbPart1: Json!
dbPart2: Json!
dbPart3: Json!
dbPart4: Json!
dbPart5: Json
dbPart6: Json
dbPart7: Json
dbPart8: Json
user: User!
lesson: Lesson! @relation(name: “LessonConstructions”)
lessonID: ID!
createdAt: DateTime!
updatedAt: DateTime!
}

type Sandbox {
id: ID! @unique
text: String!
video: String
user: User!
sandboxPage: SandboxPage! @relation(name: “SandboxesOnSandboxPage”)
sandboxPageID: ID!
link: String
createdAt: DateTime!
updatedAt: DateTime!
likes: Int @default(value: “0”)
}

type Test {
id: ID! @unique
question: String!
answer1: String!
answer1Correct: String!
answer2: String!
answer2Correct: String!
answer3: String
answer3Correct: String
answer4: String
answer4Correct: String
user: User!
lesson: Lesson! @relation(name: “LessonTests”)
lessonID: ID!
createdAt: DateTime!
updatedAt: DateTime!
}

type Problem {
id: ID! @unique
text: String!
hints: String
solution: String
answer: String!
user: User!
lesson: Lesson! @relation(name: “LessonProblems”)
lessonID: ID!
createdAt: DateTime!
updatedAt: DateTime!
}

type TextEditor {
id: ID! @unique
name: String!
text: String!
totalMistakes: Int
user: User!
lesson: Lesson! @relation(name: “LessonTextEditors”)
lessonID: ID!
createdAt: DateTime!
updatedAt: DateTime!
}

type Application {
id: ID! @unique
applicantId: ID!
applicantName: String!
message: String
coursePage: CoursePage! @relation(name: “ApplicationOnCoursePage”)
coursepageId: ID!
}

type Order {
id: ID! @unique
coursePageID: ID!
price: Int!
paid: Boolean @default(value: “false”)
payer: ID!
confirmation_url: String
createdAt: DateTime!
updatedAt: DateTime!
}


#6

I’m getting this same problem. The prisma deploy is successful, but the changes to my datamodel are not reflected from the prisma playground or from my application server. When I run my application server and try to access the new datamodel, it has errors like this:

“[GraphQL error]: Message: Unknown type ‘NetworkStatsWhereUniqueInput’. Did you mean ‘NetworkStatisticsUpdateInput’, ‘BlockWhereUniqueInput’, ‘DailyNetworkStatisticsWhereUniqueInput’, ‘NetworkStatisticsCreateInput’ or ‘NetworkStatisticsWhereInput’? (line 1, column 23):”

NetworkStatsWhereUniqueInput is from the new datamodel.

I’ve tried “prisma deploy” several more times in an attempt to fix this, and it outputs this every time:

" Deploying service **dfinity-explorer** to stage **dev** to server **dfinity-explorer** 1.7s

Service is already up to date.

post-deploy :

Generating schema… 32ms

Saving Prisma GraphQL schema (SDL) at /Users/dylan/Documents/Developer/GitHub/dfinityexplorer-server/src/generated/prisma.graphql

Running prisma generate :heavy_check_mark:"

I actually had this same problem on March 30, but after a while the problem resolved itself without me having to do anything. After a few hours, the problem just went away, and my datamodel was correctly deployed. However, this time that has not happened. It’s been over 12 hours, and I’m still having the problem.


#7

I worked around this problem this time by following your advice of deploying under a new service name using ‘prisma deploy -n’.


#8

I’m having the same issue. I just filed https://github.com/prisma/prisma/issues/4355 so that it’s tracked there as well.

In my case, the exact same changes worked fine locally (in Docker) and on my dev server, but aren’t working on my production server (which is configured the same as my dev server). Since it’s prod, I can’t just deploy to a new/different instance, I need to figure out why it’s not working on this instance.


#9

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.