You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mutation {
createOneRecipe(data: {
name: "X"
link: "X"
imageUrl: "X"
prepTime: "X"
servings: "X"
numSaved: 5
categories: [FAST_FOOD]
allergies: []
diets: []
cuisines: []
periods: []
recommended: false
ingredients: {
connectOrCreate: [
{
create: {
quantity: 5
ingredient: {
connect: {
name: "X"
}
}
}
where: {
recipeLink_ingredientName: {
recipeLink: "X"
ingredientName: "X"
}
}
}
]
}
}) {
id
link
name
prepTime
servings
numSaved
categories
allergies
cuisines
diets
periods
userEmail
imageUrl
recommended
ingredients {
quantity
recipeLink
ingredientName
ingredient {
id
name
currency
price
unit
userEmail
}
}
}
}
Logs
prisma:engine }
prisma:engine }
prisma:engine {
prisma:engine error: Error: connect ECONNREFUSED 127.0.0.1:49245
prisma:engine at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16) {
prisma:engine errno: -61,
prisma:engine code: 'ECONNREFUSED',
prisma:engine syscall: 'connect',
prisma:engine address: '127.0.0.1',
prisma:engine port: 49245
prisma:engine }
prisma:engine }
prisma:engine {
prisma:engine error: Error: connect ECONNREFUSED 127.0.0.1:49245
prisma:engine at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16) {
prisma:engine errno: -61,
prisma:engine code: 'ECONNREFUSED',
prisma:engine syscall: 'connect',
prisma:engine address: '127.0.0.1',
prisma:engine port: 49245
prisma:engine }
prisma:engine }
prisma:engine stdout Starting a postgresql pool with 9 connections.
prisma:engine stdout Started http server on http://127.0.0.1:49286
prisma:engine Search for Query Engine in /Users/jacktan/Documents/git/foodbudget/node_modules/.prisma/client
plusX Execution permissions of /Users/jacktan/Documents/git/foodbudget/node_modules/.prisma/client/query-engine-darwin are fine
prisma:engine Client Version: 2.21.2
prisma:engine Engine Version: query-engine e421996c87d5f3c8f7eeadd502d4ad402c89464d
prisma:engine Active provider: postgresql
prisma:engine stdout PANIC in /root/.cargo/git/checkouts/rust-postgres-dc0fca9be721a90f/8a61d46/postgres-types/src/lib.rs:762:18
expected array type
prisma:engine {
prisma:engine error: SocketError: other side closed
prisma:engine at Socket.onSocketEnd (/Users/jacktan/Documents/git/foodbudget/node_modules/@prisma/client/runtime/index.js:25205:24)
prisma:engine at Socket.emit (events.js:327:22)
prisma:engine at Socket.EventEmitter.emit (domain.js:467:12)
prisma:engine at endReadableNT (internal/streams/readable.js:1327:12)
prisma:engine at processTicksAndRejections (internal/process/task_queues.js:80:21) {
prisma:engine code: 'UND_ERR_SOCKET'
prisma:engine }
prisma:engine }
prisma:engine {
prisma:engine error: SocketError: other side closed
prisma:engine at Socket.onSocketEnd (/Users/jacktan/Documents/git/foodbudget/node_modules/@prisma/client/runtime/index.js:25205:24)
prisma:engine at Socket.emit (events.js:327:22)
prisma:engine at Socket.EventEmitter.emit (domain.js:467:12)
prisma:engine at endReadableNT (internal/streams/readable.js:1327:12)
prisma:engine at processTicksAndRejections (internal/process/task_queues.js:80:21) {
prisma:engine code: 'UND_ERR_SOCKET'
prisma:engine }
prisma:engine }
prisma:engine {
prisma:engine error: SocketError: other side closed
prisma:engine at Socket.onSocketEnd (/Users/jacktan/Documents/git/foodbudget/node_modules/@prisma/client/runtime/index.js:25205:24)
prisma:engine at Socket.emit (events.js:327:22)
prisma:engine at Socket.EventEmitter.emit (domain.js:467:12)
prisma:engine at endReadableNT (internal/streams/readable.js:1327:12)
prisma:engine at processTicksAndRejections (internal/process/task_queues.js:80:21) {
prisma:engine code: 'UND_ERR_SOCKET'
prisma:engine }
prisma:engine }
When attempting to migrate after modifying enum values, I get this error.
Error: Database error
Error querying the database: db error: ERROR: column "allergies" cannot be cast automatically to type "Allergy"[]
HINT: You might need to specify "USING allergies::"Allergy"[]".
0: migration_core::api::ApplyMigrations
at migration-engine/core/src/api.rs:73
Here is the SQL migration file:
/* Warnings: - The values [SULPHITE,TREE_NUT] on the enum `Allergy` will be removed. If these variants are still used in the database, this will fail. - Changed the column `allergies` on the `Recipe` table from a scalar field to a list field. If there are non-null values in that column, this step will fail. - Changed the column `allergies` on the `User` table from a scalar field to a list field. If there are non-null values in that column, this step will fail.*/-- AlterEnumBEGIN;
CREATETYPE "Allergy_new" AS ENUM ('GLUTEN', 'PEANUT', 'SEAFOOD', 'SESAME', 'SOY', 'DAIRY', 'EGG', 'WHEAT');
ALTERTABLE"Recipe" ALTER COLUMN "allergies" TYPE "Allergy_new" USING ("allergies"::text::"Allergy_new");
ALTERTABLE"User" ALTER COLUMN "allergies" TYPE "Allergy_new" USING ("allergies"::text::"Allergy_new");
ALTERTYPE"Allergy" RENAME TO "Allergy_old";
ALTERTYPE"Allergy_new" RENAME TO "Allergy";
DROPTYPE"Allergy_old";
COMMIT;
-- AlterTableALTERTABLE"Recipe" ALTER COLUMN "allergies"SET DATA TYPE "Allergy"[];
-- AlterTableALTERTABLE"User" ALTER COLUMN "allergies"SET DATA TYPE "Allergy"[];
It has something to do with modifying the enum values, because I did a similar migration before this, by changing the enum value, and I get the same error. This is the error I got when I attempt to call prisma.
Invalid `prisma.recipe.create()` invocation:
PANIC in /root/.cargo/git/checkouts/rust-postgres-dc0fca9be721a90f/8a61d46/postgres-types/src/lib.rs:762:18
expected array type
The text was updated successfully, but these errors were encountered:
This issue is still ongoing. I have reset my database and tried everything to make this work.
If I initiate the model for the first time, it's fine. When I modify the enum I get the error.
I can confirm this issue comes from Prisma itself. I'm not familiar with Rust at all, but is there some way I can do anything to escalate this? Because this is a huge bug issue.
Hi Prisma Team! My Prisma Client just crashed. This is the report:
Versions
Query
Logs
When attempting to migrate after modifying enum values, I get this error.
Here is the SQL migration file:
I change this enum:
Prisma
to
It has something to do with modifying the enum values, because I did a similar migration before this, by changing the enum value, and I get the same error. This is the error I got when I attempt to call prisma.
The text was updated successfully, but these errors were encountered: