kleydon / prisma-session-store

Express session store for Prisma
MIT License
116 stars 18 forks source link

Crashing #75

Closed OmkarK45 closed 2 years ago

OmkarK45 commented 2 years ago

Hey there! Thank you for creating this library. It is working really well so far. However, my server crashed recently with the following log

C:\Users\omkar\Documents\GitHub\issue-tracker\api\node_modules\@prisma\client\runtime\index.js:38691
          throw new PrismaClientKnownRequestError(message, e.code, this.prisma._clientVersion, e.meta);
                ^
Error:
Invalid `this.prisma[this.sessionModelName].findMany()` invocation in
C:\Users\omkar\Documents\GitHub\issue-tracker\api\node_modules\@quixo3\prisma-session-store\dist\lib\prisma-session-store.js:407:81

  404     return [2 /*return*/];
  405 // XXX More efficient way? Maybe when filtering is fully implemented? XXX
  406 this.logger.log('Checking for any expired sessions...');
→ 407 return [4 /*yield*/, this.prisma[this.sessionModelName].findMany(
  The column `Session.sid` does not exist in the current database.
    at cb (C:\Users\omkar\Documents\GitHub\issue-tracker\api\node_modules\@prisma\client\runtime\index.js:38691:17)

Prisma Version - 3.4.2 Prisma Session Store version - 3.1.0

OmkarK45 commented 2 years ago

Update on this : I viewed my database through TablePlus and turns out there was no sid column. So I ran npx prisma migrate dev to fix the issue Closing this!

kleydon commented 2 years ago

Hey @OmkarK45 - Glad its working for you, after this initial hiccup!