Prisma Client Error: Column User.stripe_customer_id Does Not Exist in PostgreSQL Database

I’m encountering an error while using Prisma Client with a PostgreSQL database. The error message indicates that the column User.stripe_customer_id does not exist in the current database. Here are the details of my setup and the steps I’ve taken so far.

Message: Error in Prisma Client request: 
Invalid `f=e.match(KCt)?.[1]??"",g=e.match(YCt)?.[1]??null,v=e.match(XCt)?.[1]??null,{getPrismaClient:E,PrismaClientKnownRequestError:x,PrismaClientRustPanicError:D,PrismaClientInitializationError:P,PrismaClientValidationError:A}=require(`${c.prismaClient}/runtime/${u}`),k=e,F=(0,bq.createHash)("sha256").update()` invocation in
C:Usershpsummelionode_modules.pnpm[email protected]node_modulesprismabuildindex.js:1969:10254

  1966       }
  1967     }
  1968   }
→ 1969 `}});return Ye.resourceList(a.workspaces)}};var ETe=require("@prisma/engines");var ZEe=require("buffer");function e_e(e,r,n,i){Object.defineProperty(e,r,{get:n,set:i,enumerable:!0,configurable:!0})}var t_e={};e_e(t_e,"serializeRPCMessage",()=>L6);e_e(t_e,"deserializeRPCMessage",()=>M6);var F6="PrismaBigInt::",$6="PrismaBytes::";function L6(e){return JSON.stringify(e,(r,n)=>typeof n=="bigint"?F6+n:n?.type==="Buffer"&&Array.isArray(n?.data)?$6+ZEe.Buffer.from(n.data).toString("base64"):n)}function M6(e){return JSON.parse(e,(r,n)=>typeof n=="string"&&n.startsWith(F6)?BigInt(n.substr(F6.length)):typeof n=="string"&&n.startsWith($6)?n.substr($6.length):n)}var hTe=U(u_e()),UP=U(eTe()),mTe=U(require("http")),gTe=U(nTe()),vTe=require("zlib");var Co=require("path");var bq=require("crypto"),cTe=U(hq());function vq(e,r,n,i){Object.defineProperty(e,r,{get:n,set:i,enumerable:!0,configurable:!0})}var lTe=globalThis,mq={},BP={},wf=lTe.parcelRequire1308;wf==null&&(wf=function(e){if(e in mq)return mq[e].exports;if(e in BP){var r=BP[e];delete BP[e];var n={id:e,exports:{}};return mq[e]=n,r.call(n.exports,n,n.exports),n.exports}var i=new Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i},wf.register=function(r,n){BP[r]=n},lTe.parcelRequire1308=wf);var pTe=wf.register;pTe("9lTzd",function(module,exports){vq(module.exports,"guessEnginePaths",()=>guessEnginePaths),vq(module.exports,"guessPrismaClientPath",()=>guessPrismaClientPath);var $5COlq=wf("5COlq");async function guessEnginePaths({forceBinary,forceLibrary,resolveOverrides}){let queryEngineName,queryEngineType;if(forceLibrary?(queryEngineName=await(0,$5COlq.prismaEngineName)("query-engine","library"),queryEngineType="library"):forceBinary?(queryEngineName=await(0,$5COlq.prismaEngineName)("query-engine","binary"),queryEngineType="binary"):(queryEngineName=void 0,queryEngineType=void 0),!queryEngineName||!queryEngineType)return{queryEngine:void 0};let queryEnginePath;if(resolveOverrides[".prisma/client"])queryEnginePath=(0,Co.resolve)(resolveOverrides[".prisma/client"],`../${queryEngineName}`);else if(resolveOverrides["@prisma/engines"])queryEnginePath=(0,Co.resolve)(resolveOverrides["@prisma/engines"],`../../${queryEngineName}`);else{let atPrismaEnginesPath;try{atPrismaEnginesPath=eval("require.resolve('@prisma/engines')")}catch(e){throw new Error("Unable to resolve Prisma engine paths. This is a bug.")}queryEnginePath=(0,Co.resolve)(atPrismaEnginesPath`../../${queryEngineName}`)}return{queryEngine:{type:queryEngineType,path:queryEnginePath}}}function guessPrismaClientPath({resolveOverrides}){let prismaClientPath=resolveOverrides["@prisma/client"]||eval("require.resolve('@prisma/client')");return(0,Co.resolve)(prismaClientPath,"../")}});pTe("5COlq",function(e,r){vq(e.exports,"prismaEngineName",()=>n);async function n(i,a){let o=await Gr(),u=o==="windows"?".exe":"";if(a==="library")return $a(o,"fs");if(a==="binary")return`${i}-${o}${u}`;throw new Error(`Unknown engine type: ${a}`)}});function VCt(e){return{models:gq(e.models),enums:gq(e.enums),types:gq(e.types)}}function gq(e){let r={};for(let{name:n,...i}of e)r[n]=i;return r}var Gb=(0,cTe.debug)("prisma:studio-pcw"),KCt=/^s*datasources+([^s]+)s*{/m,YCt=/url *= *env("(.*)")/,XCt=/url *= *"(.*)"/;async function JCt({schema:e,schemaPath:r,dmmf:n,datasourceProvider:i,previewFeatures:a,datasources:o,engineType:u,paths:c,directUrl:l,versions:p}){let f=e.match(KCt)?.[1]??"",g=e.match(YCt)?.[1]??null,v=e.match(XCt)?.[1]??null,{getPrismaClient:E,PrismaClientKnownRequestError:x,PrismaClientRustPanicError:D,PrismaClientInitializationError:P,PrismaClientValidationError:A}=require(`${c.prismaClient}/runtime/${u}`),k=e,F=(0,bq.createHash)("sha256").update(
The column `User.stripe_customer_id` does not exist in the current database.
  
Query:
{
  "modelName": "User",
  "operation": "findMany",
  "args": {
    "take": 100,
    "skip": 0,
    "select": {
      "id": true,
      "email": true,
      "stripeCustomerId": true,
      "stripeSubscriptionId": true,
      "stripePriceId": true,
      "stripeCurrentPeriodEnd": true
    }
  }
}

Prisma Schema :

const users = await prisma.user.findMany({
  take: 100,
  skip: 0,
  select: {
    id: true,
    email: true,
    stripeCustomerId: true,
    stripeSubscriptionId: true,
    stripePriceId: true,
    stripeCurrentPeriodEnd: true
  }
});

Checked Database Schema:
I ran the command d “User” in my PostgreSQL database to verify that the User table includes the columns stripe_customer_id, stripe_subscription_id, stripe_price_id, and stripe_current_period_end.

Ran Prisma Migrate:
I executed npx prisma migrate dev –name sync_with_schema to ensure that any changes in my Prisma schema were applied to the database.

Generated Prisma Client:
I used npx prisma generate to regenerate the Prisma client so that it reflects the latest schema changes.

Checked Environment Variables:
I verified that my DATABASE_URL environment variable is correctly set to point to my PostgreSQL database.

Enabled Debug Logs:
I added DEBUG=”*” to my .env file to enable detailed Prisma debug logs.

What I Expected:
I expected the Prisma client to successfully execute the query without errors, retrieving the specified fields from the User table.
**
What Actually Happened:**
The error persisted, indicating that the column User.stripe_customer_id does not exist in the current database, despite confirming its presence in the schema and database. The query failed to execute as expected, preventing me from retrieving the user data.

New contributor

M4dM4x_ is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật